主题 : nginx集成tomcat失败
级别: 秀才
UID: 112489
积分:68 加为好友
威望: 1 精华: 0
主题:4 回复:34
注册时间:2017-04-14
在线时长:0
1#   发表于:2021-09-15 16:04:30  IP:183.194.*.*
你好,我后端vue用nginx部署成功了,但是我访问ip的时候,提示服务器端错误,应该是没连接到tomcat的后端服务,,是我nginx配置错误了嘛?麻烦帮我看下呢,谢谢


    #gzip  on;
 upstream localhost {
    server 39.106.27.144:8888 weight=1 max_fails=2 fail_timeout=10s;
    }

 server {
        listen       80;
        server_name  39.106.27.144;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

location ^~ /jeecms {
proxy_pass              http://localhost;
proxy_set_header        Host 127.0.0.1;
proxy_set_header        X-Real-IP $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
root   jeecms;
index  index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=$1 last;
break;
}

}
级别: 总版主
UID: 10736
积分:149787 加为好友
威望: 212 精华: 42
主题:297 回复:127674
注册时间:2010-09-08
在线时长:90.1
2#   发表于:2021-09-15 16:08:35  IP:111.202.*.*
ngingx配置需要你们服务器运维人员去排查 这块和软件不相关
路漫漫其修远兮,吾将上下而求索!
1 共1页