nginx -s reload: changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker process -s reopen: re-opening log files -h 帮助 -p prefix: set prefix path (default: /usr/local/nginx/) -c filename : set configuration file (default: conf/nginx.conf) -g directives : set global directives out of configuration file
普通代理
1 2 3 4 5 6 7 8
server { listen 8080; server_name 127.0.0.1; location / { root html/public; index index.html; } }
反向代理
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# proxy to my host port:80 location / { proxy_pass http://192.168.216.1:80/; proxy_redirect / /; }
# proxy to my host port:8080 location /devs/ { proxy_pass http://192.168.216.1:8080/; proxy_redirect / /devs; } #proxy to my host port:4200 location /devw/ { proxy_pass http://192.168.216.1:4200/; proxy_redirect / /devw/; }