• 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!
  • 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.

Resolved error 502 bad gateway when nginx is enabled

fferraro87

Basic Pleskian
Hi,

yesterday night i've all my sites on my plesk with this error "502 bad gateway" from nginx.
After that i've disabled nginx everything now it works fine.

I've tried to uninstall and reinstall nginx and also i've tried to use "plesk repair web" and nothing changed.

I've this plesk installed :
Code:
Product version: Plesk Onyx 17.5.3 Update #23
    Update date: 2017/09/25 14:27
     Build date: 2017/03/17 16:00
     OS version: CentOS 7.4.1708
       Revision: 55d1b49a272f44666e1920eca8b6e4da449a38cd
   Architecture: 64-bit
Wrapper version: 1.2

what can i do?
 
If you try to search phrase "502 bad gateway nginx" in Plesk KB articles, you will see that many different reasons may cause this issue. Therefore, a simple declaration of a problem is not enough. More details are needed to reduce the number of different reasons. It would be very useful to see the messages related to this problem from the logs.
 
yeah sorry, in the nginx log i don't have strange error, instead on error log on httpd i've many lines like this :

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib64/php/modules/memcache.so' - /opt/plesk/php/5.6/lib64/php/modules/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
maybe this can be the problem?

Thanks
 
Looks like that you have defined memcache.so php module in php5.6 config (ini file) but haven't it installed. Find this ini file with

# grep -R memcache.so /opt/plesk/php/5.6/etc/*

and comment this line in config file. After that run

# plesk bin php_handler --reread
 
Looks like that you have defined memcache.so php module in php5.6 config (ini file) but haven't it installed. Find this ini file with

# grep -R memcache.so /opt/plesk/php/5.6/etc/*

and comment this line in config file. After that run

# plesk bin php_handler --reread

i don't have any output from first command
 
Please doublecheck my command

grep -R memcache.so /opt/plesk/php/5.6/etc/*
 
Maybe you have specified memcache.so module in one of subscription's PHP settings?
 
Try to check it with

# grep -R memcache.so /var/www/vhosts/system/*
 
ok i've found one subscription with memcache enabled and i've remove this, i've restarted nginx and now it works.

Thanks
 
Back
Top