nginx配置及性能调优
https://www.toutiao.com/i6765746230141125132/?timestamp=1575450096&app=news_article&group_id=6765746230141125132&req_id=201912041701360100260760263C04643 2.4、配置默认主页 location / { index index.html index.htm; autoindex off; } 2.5、配置反向代理 location / { proxy_pass http://localhost:8888; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } 2.6、URL 美化(省略 index.html 入口文件) location / { try_files $uri $uri/ /index.html; } 2.7、upstream 代码块 upstream 代码块位于 http 代码块内部。 upstream 用于对服务器集群进行负载均衡的配置。 upstream name { ip_hash; server