Modify the nginx.conf file implementation. The path of this file is /usr/local/nginx/conf/nginx.conf on Linux and \conf\nginx.conf under Windows.
server {
listen 80;
server_name localhost;
……
}
改成
server {
listen 81;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
……
}
Node under server:
listen: listen on port 80
server_name: which address to forward to
proxy_pass: which address to proxy to
nginx common commands (to enter the nginx directory):
Start: start nginx
Restart: nginx -s reload