• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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