nginx配置文件
server { listen 80 default; server_name _; return 404; } upstream lucky.centoscn.vip { server 127.0.0.1:8081 ; } server { listen 80; server_name lucky.centoscn.vip; client_max_body_size 20M; location ~ ^/health { return 200; } location / { proxy_pass http://lucky.centoscn.vip/; } } }
检查有没有错误
[root@iZ2zeflzb6atg5mhyyxn7oZ nginx]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [root@iZ2zeflzb6atg5mhyyxn7oZ nginx]# nginx -s reload
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论