在CentOS 7上安装的Nginx也会成功获取默认页面,但是当尝试浏览应用程序时会出现nginx错误

问题描述

在CentOS 7上安装的Nginx也成功获取默认页面,但是当尝试浏览它时会显示

nginx错误您正在寻找的页面暂时不可用。 请稍后再试。

检查错误后,日志上会显示

2020/10/30 10:25:01 [crit] 355290#0:* 1连接到上游c $时,对127.0.0.1:7823的connect()失败(13:权限被拒绝)

添加nginx.conf详细信息:

服务器{

    listen 443 ssl;
    listen [::]:443 ssl;
    server_name xxxxx.in;
    ssl_certificate     /etc/nginx/ssl/xxx.crt;
    ssl_certificate_key /etc/nginx/ssl/xxx.key;

    root /usr/share/nginx/html;
    #root         /var/www/html;

    #index index.php  index.html index.htm;
    index index.php index.html index.htm index.nginx-debian.html;

    location / {
    }

    location /hoh-bot
    {
           
           allow all;
           proxy_pass http://127.0.0.1:7823;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection 'upgrade';
           proxy_set_header Host $host;
           proxy_cache_bypass $http_upgrade;
       }
       location /hoh-bot-socket
       {
           proxy_pass http://127.0.0.1:7823/socket.io;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "upgrade";
       }
       location /hoh2 {
           return 200 'Testng';
       }
       error_page 404 /404.html;
           location = /40x.html {
       }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }

}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)