Windows Server build nginx

(A) official website to download the stable version: http://nginx.org/en/download.html

(2) After completion of download, unzip, click nginx.exe start, or cd into the folder start nginx nginx 

May, after (three) started successfully http: // localhost: 8080 / to see a successful start after interface

 

 

 (D) if it fails to start, you can see the error in error.log file: summed up, either pathname Chinese, either repeat the port, the default port is 8080, you can modify the configuration file into the nginx.conf listen port : 8888 (listen [::]: 8888 ipv6only = on;)

After modification nginx -s reload, reload it

 

 

 (E) attempt to build their own server, add the following code nginx.conf file: After modification nginx -s reload, reload it

{Server 
the listen 8081; // listening port
server_name localhost; // server name
location / {// increase cross-domain requests
root F: / liujinyuan / resource; // address static resources stored
access_log on; // logging
autoindex on; // glance at the list of resource files
}
}

 

 

 OK! Open http: // localhost: 8081 /

 

Guess you like

Origin www.cnblogs.com/endoraLiu/p/12448115.html
Recommended