配置nginx反向代理网页后未加载

问题描述 投票:0回答:1

要将我的网络应用程序上传到我的 vps 主机服务器,我执行了以下步骤: 1 - 部署war文件 2 - 安装nginx进行反向代理 3 - 配置nginx.conf

server {
              listen       80;
              listen       [::]:80;
              server_name  itcmedbr.com;
              #root         /usr/share/nginx/html;
     
              # Load configuration files for the default server block.
              include /etc/nginx/default.d/*.conf;
     
              location / {
                  proxy_pass http://ipaddress;
     
              }
     
              error_page 404 /404.html;
                  location = /40x.html {
              }
     
              error_page 500 502 503 504 /50x.html;
                  location = /50x.html {
              }
          }

4 - 配置wildfly launch.sh

#!/bin/bash
      
       if [ "x$WILDFLY_HOME" = "x" ]; then
           WILDFLY_HOME="/opt/wildfly"
       fi
      
       if [[ "$1" == "domain" ]]; then
           $WILDFLY_HOME/bin/domain.sh -c $2 -b $3
       else
          $WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement=ipaddress
      fi

如果我写 http://ipaddress:80 或 http://ipaddress:8080 ,我的 web 应用程序的索引页面会被加载,但如果我写 www.itcmedbr.com 则不会加载任何内容,并且我收到“无法访问此网站” ”。 有人来帮助我吗?

java nginx wildfly
1个回答
0
投票

您的代理通行证还需要列出 Wildfly 正在侦听的端口号,最有可能是端口 8080

© www.soinside.com 2019 - 2024. All rights reserved.