Build Nginx+php+mysql Environment under Windows

Source: Internet
Author: User

First, download the necessary things

1.nginx:http://nginx.org/en/download.html

2.php:http://php.net/downloads.php

3.mysql: (for the time being)

Second, installation and configuration

1. Configure PHP:

Rename the php.ini-development to php.ini and modify the configuration in it.

  ENABLE_DL = On

  Cgi.force_redirect = 0 

  Cgi.fix_pathinfo=1

  Fastcgi.impersonate = 1

  Cgi.rfc2616_headers = 1

  Extension_dir = "./ext" (write absolute path also line) 

2. Configure Nginx (mainly configure it to support PHP) Note the $document_root variable in this area, it corresponds to the root parameter value, if we do not define the root parameter or the root comment out, when accessing PHP,

No input file specified will appear on the page. Tips.

Location ~ \.php$ {            root           f:/wnmp/nginx-1.10.2/html; #这是目录路径 (default is the HTML directory that writes Nginx, "Welcome to Nginx when accessed" ")            fastcgi_pass   127.0.0.1:9000;            Fastcgi_index  index.php;            Fastcgi_param  script_filename  $document _root$fastcgi_script_name; #            include        Fastcgi_params;        }

(1). Note that the $document_root here is the root parameter value that is the path above, if there is no definition, or comments, when accessing PHP, the page prompts no input file specified

Location/{            root   f:/wnmp/nginx-1.10.2/html;            Index  index.php;# add index.php here for Nginx to recognize the PHP script         }


Build Nginx+php+mysql Environment under Windows

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.