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

nginx configuration under windows

WBOY
Release: 2016-08-08 09:25:38
Original
1102 people have browsed it

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
Copy after login

Access 127.0.0.1 and that’s it.

Common commands:

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

4. Modify the root directory:

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

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;
        }
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template