• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue All my nodeJS sites having nginx 502 Error after restoring bakcup

beufreecasse

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian Web Pro Edition 18.0.58
Hello,
I'm facing a big issue with plesk and nodejs. I initially had a centos with plesk and because centos was to old i decided to migrate to ubuntu 22.$
I've made a backup of my plesk server with backup manager and I installed ubuntu on it.
Then I installed Plesk on the brand new ubuntu server and restored my backup with full system option.
EVerything was fine until i tried to do npm install. After that my app was having 502. I tried to uninstall node server feature and reinstall it but now all my node apps are having the same issue with 502 error.
When I check the nginx log I see :
19292#0: *7 connect() failed (111: Connection refused) while connecting to upstream

If someone could help me with this issue.

Thank you
 
It works, because then Apache won't need to be contacted by Nginx. The 502 gateway error comes into play when Nginx forwards a request to Apache, but does not receive a timely response from Apache. When you do all processing through Nginx only that won't happen. In order to find out why Apache is not responding, first make sure that the service apache2 is running. Then examine the error_log of the affected domain for details. One frequent cause is that PHP is set to "PHP via Nginx", but proxy mode is on, so that PHP requests are forwarded to Apache where they cannot be handled, because PHP is set to Nginx.

Your question here is whether it is safe to disable Apache. Yes, it is safe and it is probably even the better choice, because Nginx uses less resources and processes requests faster. If you do not need .htaccess rules, Nginx is the better choice.
 
Thank you for your answer, do you know how to change php config so it's not set with PHP via Nginx?
In fact in the php selection list i just have php with nginx listed
 
Thank you, I changed it but still have 502 error if proxy mode enabled and php set to apache. Also I don't have any error.log from apache so I don't know where the problem comes from.
Do you have any idea?
 
A log for Apache might need a day to show up under the subscription account. But you can check /var/www/vhosts/system/<your domain>/logs to see it there right away.
 
Back
Top