Home >Backend Development >PHP Tutorial >nginx configuration under windows

nginx configuration under windows

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-08-08 09:25:381132browse

1. Download:

http://nginx.org/download/nginx-1.8.0.zip

2. Unzip to:

D:/nginx-1.8.0

3. Run command:

cd nginx

start nginx

Access 127.0.0.1 and that’s it.

Common commands:

nginx -s stop          // 停止nginx
nginx -s reload       // 重新加载配置文件  ,只能在运行时执行
nginx -s quit          // 退出nginx

4. Modify the root directory:

       location / {
            root   D:/html;
            index  index.html index.htm inde.php;
        }

5. Set up PHP support

    location ~ \.php$ {
            root           D:/html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

The above introduces the nginx configuration under windows, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn