My site was running fine and then I updated nuxt.config.js. Then after that, the site starts to show Service Unavailable.
I am using pm2 to start / deploy the app. Its vps server with apache in it.
Its showing:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
But, if I run npm run dev the site loads fine without any issue. Also, I checked the status with pm2 list, it showing the app is online.
My 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"
}
}
}
And, my domain.link.conf looks like:
<VirtualHost *:80>
ServerName domain.link
ServerAlias www.domain.link
ServerAdmin admin@domain.link
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>
But, if I check apache2/error.log it showing:
[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/