宝塔 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;
}
}
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
全部替换故障
以上故障已解决,后面少了 } 这个符号,加上正常保存 配置好。./start.sh 也正常了,无法访问。3000放行了,9999也放了:'( nginx启动成功了 jishenghua 发表于 2021-7-11 23:31 static/image/common/back.gif
nginx启动成功了
server.port=9999
这个是不是端口配置。安全组也放行了9999.无法访问。 以上问题已解决。由于用的是阿里云服务器,端口放行应该从阿里云开始。:lol
咋解决的 可爱的小麦麦 发表于 2021-8-31 17:33 static/image/common/back.gif
咋解决的
阿里云服务器,端口放行应该从阿里云开始
页:
[1]