代理:错误] [pid 137137](111)连接被拒绝:AH00957:HTTP:尝试连接到 ip:49000

代理:错误] [pid 137137](111)连接被拒绝:AH00957:HTTP:尝试连接到 ip:49000

我的网站运行良好,然后我进行了更新nuxt.config.js。之后,网站开始显示Service Unavailable

我正在使用 pm2 来启动/部署应用程序。它的 vps 服务器中装有 apache。

其显示:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

,如果我运行,npm run dev网站加载正常,没有任何问题。此外,我使用检查了状态pm2 list,它显示该应用程序处于在线状态。

我的 package.json

{
  "name": "nuxtjs",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt --hostname domain.link --port 49000",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate",
    "deploy": "pm2 start npm --name nuxtjs -- start"
  },
  "dependencies": {
    "@nuxtjs/axios": "^5.13.6",
    "@yeger/vue-masonry-wall": "^3.0.16",
    "core-js": "^3.19.3",
    "nuxt": "^2.15.8",
    "pm2": "^5.1.2",
    "vue": "^2.6.14",
    "vue-server-renderer": "^2.6.14",
    "vue-template-compiler": "^2.6.14",
    "webpack": "^4.46.0"
  },
  "devDependencies": {},
  "config": {
    "nuxt": {
      "host": "0.0.0.0",
      "port": "49000"
    }
  }
}

我的domain.link.conf长相是这样的:

<VirtualHost *:80>

    ServerName domain.link
    ServerAlias www.domain.link
    ServerAdmin [email protected]

    DocumentRoot /var/www/html
    <Directory /var/www/html/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

    ProxyRequests Off
    ProxyPreserveHost On
    ProxyVia Full

    <Proxy *>
        Require all granted
    </Proxy>

    ProxyPass / http://domain.link:49000/
    ProxyPassReverse / http://domain.link:49000/

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

但是,如果我检查apache2/error.log它显示:

[Sun Feb 06 09:15:31.555004 2022] [proxy:error] [pid 137137] (111)Connection refused: AH00957: HTTP: attempt to connect to ip:49000 (domain.link) failed
[Sun Feb 06 09:15:31.555068 2022] [proxy_http:error] [pid 137137] [client 27.34.104.213:56874] AH01114: HTTP: failed to make connection to backend: domain.link, referer: http://domain.link/

相关内容