重启命令:nginx -s stop && start nginx 关闭: nginx -s stop 启动: start nginx
反向代理到百度:
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; keepalive_timeout 65; server { listen 9000;#监听的端口 server_name localhost; #访问方式:http://127.0.0.1:9000 location / { proxy_pass http://www.baidu.com:80; }
#反向代理php接口到:8888端口
location ~ /php {
proxy_pass http://localhost:8888;
}
error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
标签:基本,http,pass,nginx,html,location,使用,8888 From: https://www.cnblogs.com/laremehpe/p/16888327.html