WNMP Configuration (windows+nginx+mysql+php development environment)

Source: Internet
Author: User

Operating system: Win7 64-bit

Database: MySQL (Installation configuration not detailed here)

Php5.5.30ns (Installation configuration not detailed here)

The crux of the problem is that the Nginx server is associated with PHP

First, the Server software nginx-1.11.4

Http://nginx.org/en/download.html

Download Windows version Nginx and unzip, open Nginx.exe cmd input start nginx. Open the browser input localhost to see the following interface is indicated, NGINX installation success!

   (note 80 port occupancy issues, which can be configured in the nginx.conf file under the Conf folder ) Second, PHP associated Nginx server(Nginx Server establishes communication with the Php-cgi.exe process via TCP port 127.0.0.1:9000)Configuration according to nginx.conf: #location ~ \.php$ {
# root www;
# Fastcgi_pass 127.0.0.1:9000;
# Fastcgi_index index.php;
# Fastcgi_param Script_filename $document _root$fastcgi_script_name;
# include Fastcgi_params;
#} Configure PHP to open the database extension Extension=php_mysql.dll
Extension=php_mysqli.dll makes PHP run in CGI, on 127.0.0.1:9000. Third, in the Nginx configuration file, configure the PathInfo access mode, so that the Web server support thinkphp
  Location ~ ^.+\. php {root html; Fastcgi_pass 127.0.0.1:9000;  Fastcgi_index index.php;  Fastcgi_split_path_info ^ (. +\.php) (. *) $;  Fastcgi_param script_filename $document _root$fastcgi_script_name; This is going to be your own website path fastcgi_param path_info $fastcgi _path_info;  Fastcgi_param path_translated $document _root$fastcgi_path_info; include Fastcgi_params;  # The original configuration commented out # location ~. *\.php?$ {# root HTML; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param Script_filename $document _root$ Fastcgi_script_name; # include Fastcgi_params; # } 

WNMP Configuration (windows+nginx+mysql+php development environment)

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.