Mount the win shared directory to Linux using remote php-cgi to debug local code

Source: Internet
Author: User

Recently need to do a few PHP project in win, but do not want to build a variety of operating environment in win, just the LAN has a Linux, so the project needs to install the environment on Linux, local win only need a nginx agent can.


Here's how it's implemented:

win:192.168.0.107

linux:192.168.0.108


First, create PHP project directory C:/web under Win, and set as shared folder, share name as Web

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/93/wKioL1WiG1_DOHyiAAHhF3jpVBQ319.jpg "title=" 11111. PNG "alt=" wkiol1wig1_dohyiaahhf3jpvbq319.jpg "/>


Second, login Linux to mount the win shared directory to/mnt/web

Mount-t CIFS//192.168.0.107/web/mnt/web-o Username=jxh,password=jxh,noserverinfo


Third, modify the PHP-FPM monitoring IP and port

Vim/usr/local/webserver/php/etc/php-fpm.conflisten = 192.168.0.108:9000 #默认的127.0.0.1:9000 does not support remote access


Iv. configuring Nginx on Win

server {        listen        80;        server_name  localhost;         location / {             root   C:/web;             index  index.html index.htm;        }         error_page   500 502 503 504  / 50x.html;        location = /50x.html {             root   html;         }        location ~ \.php$  {            root            /mnt/web;            fastcgi_pass    192.168.0.108:9000;            fastcgi _index  index.php;            fastcgi_ param  script_filename  /mnt/web$fastcgi_script_name;             include        fastcgi_params;         }}


Start Nginx, use localhost to access PHP code in c:/web/




This article is from the "Creep Yuri" blog, make sure to keep this source http://87453343.blog.51cto.com/8606892/1673433

Mount the win shared directory to Linux using remote php-cgi to debug local code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.