格叻精神 发表于 2021-7-11 17:22:23

宝塔 Nginx 按官方配置3.0问题

配置Nginx文件保存提示
“ERROR:
nginx: unexpected "{" in /www/server/nginx/conf/nginx.conf:90
nginx: configuration file /www/server/nginx/conf/nginx.conf test failed”
配置内容为:
server {
    listen 3000;
    server_name localhost;
    gzip on;
    gzip_min_length 100;
    gzip_types text/plain text/css application/xml application/javascript;
    gzip_vary on;
    location / {
       root /home/jshERP3.0/jshERP-web;
       index index.html index.htm;
       try_files $uri $uri/ /index.html;
    }
   location /jshERP-boot/ {
             proxy_pass http://localhost:9999/jshERP-boot/;
             proxy_set_header Host $host:$server_port;
    }
}



格叻精神 发表于 2021-7-11 17:45:48

ERROR:
nginx: unexpected end of file, expecting "}" in /www/server/nginx/conf/nginx.conf:76
nginx: configuration file /www/server/nginx/conf/nginx.conf test failed
全部替换故障

格叻精神 发表于 2021-7-11 18:06:36

以上故障已解决,后面少了 } 这个符号,加上正常保存

格叻精神 发表于 2021-7-11 18:11:38

配置好。./start.sh 也正常了,无法访问。3000放行了,9999也放了:'(

jishenghua 发表于 2021-7-11 23:31:14

nginx启动成功了

格叻精神 发表于 2021-7-12 09:27:38

jishenghua 发表于 2021-7-11 23:31 static/image/common/back.gif
nginx启动成功了

server.port=9999
这个是不是端口配置。安全组也放行了9999.无法访问。

格叻精神 发表于 2021-7-12 17:02:00

以上问题已解决。由于用的是阿里云服务器,端口放行应该从阿里云开始。:lol

可爱的小麦麦 发表于 2021-8-31 17:33:03

咋解决的

格叻精神 发表于 2021-9-4 18:25:13

可爱的小麦麦 发表于 2021-8-31 17:33 static/image/common/back.gif
咋解决的

阿里云服务器,端口放行应该从阿里云开始
页: [1]
查看完整版本: 宝塔 Nginx 按官方配置3.0问题