"PHP sharing" WNP Local development environment building

Source: Internet
Author: User

1. nginx+php Installation
    1. Download Nginx, install to the specified directory, such as D:\nginx-1.7.5.
    2. Download PHP, install to the specified directory, such as D:\php. Note: PHP Binaries in the window environment include both thread-safe and non-thread-safe versions, and they need to be consistent when selecting the appropriate version to install independently of the expansion packs.
2. Environment configuration 1). Nginx Configuration:
# nginx.conf      server {Listen 80;    server_name localhost;    Access_log Logs/localhost.access.log;        Location/{root d:/localhost/trunk;    Index index.html index.htm index.php;    } error_page 502 503 504/50x.html;    Location =/50x.html {root html;        } location ~ \.php$ {root D:/localhost/trunk;        Fastcgi_pass 127.0.0.1:9000;        Fastcgi_index index.php;        Fastcgi_param script_filename $document _root$fastcgi_script_name;    Include Fastcgi_params; }}
2). Configure the Local Host
127.0.0.1 localhost
3. Start/Stop service script
 #start_service. bat   @echo Offrem the maximum number of requests processed per process, or set to Windows environment variable set Php_fcgi_max_requests=1000echo starting PHP FastCGI ... Runhiddenconsole d:/php/php-cgi.exe-b 127.0.0.1:9000-c d:/php/php.ini echo starting nginx ... Runhiddenconsole d:/nginx-1.7.5/nginx.exe-p d:/nginx-1.7.5  
#stop_service. Bat @echo Offecho stopping nginx...taskkill/f/im nginx.exe > Nulecho stopping PHP fastcgi...taskkill/f/im php-cgi.e Xe > Nulexit

Finally, double-click Start_service.bat to start the corresponding service.

4. Visit localhost/index.php to see the homepage

"PHP sharing" WNP Local development environment building

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.