nginx启动后 域名访问出现:504 Gateway Time-out
来源:17-6 .nginx负载均衡配置及验证

慕粉113505763
2019-02-28
1.nginx启动无错误2.ip访问也无问题
3.域名访问出现504
知道解决方法的留个言,谢谢了!
2回答
-
慕粉113505763
提问者
2019-03-01
upstream www.mallshi.online{
server 127.0.0.1:8080;
server 127.0.0.1:9080;
}
server {
listen 80;
autoindex on;
server_name mallshi.online www.mallshi.online;
access_log /usr/local/nginx/logs/access.log combined;
index index.html index.htm index.jsp index.php;
if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
}
location = / {
root /product/front/mmall_fe/dist/view;
index index.html;
}
location ~ .*\.html$ {
root /product/front/mmall_fe/dist/view;
index index.html;
}
location / {
proxy_pass http://www.mallshi.online/;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
proxy_pass http://mallshi.online;
expires 30d;
}
location ~ .*\.(js|css)?$ {
proxy_pass http://mallshi.online;
expires 7d;
00 -
geelylucky
2019-02-28
亲爱的同学,你好,我是geely老师的助教。
你应该贴出你的nginx的配置,启动没报错不代表你的配置正确,只能说明你的配置语法没错,不代表配置的逻辑正确。
022019-03-01
相似问题