First, to the Nginx official website to download the latest version, download URL:
Http://nginx.org/en/download.html
Second, unzip the zip package, the directory is changed to Nginx. Placed in the D-packing directory, can also be placed in other directories.
Then at the command line, switch Nginx's home directory execution command can start, stop, restart.
Start Nginx // Start-S Stop // stop nginx-S Reload Reload the configuration file and restart
Three, configuration:
#隐藏版本号 server_tokens off; #默认用IP访问时 Server {Listen theDefault_server; server_name _; return 444; #rewrite^ http://www.pipidaohang.com;} #多配一个域名 Server {Listen the; server_name www.pipidaohang.com; Location/{#本机目录 #root html/12345678; #index index.html index.htm; #解决 #反向代理配置 proxy_pass http://220.111.222.333:8080;} error_page - 502 503 504/50x.html; Location= /50x.html {root HTML/12345678; } }
Installing Nginx reverse proxy server under Windows