• 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

Plesk Panel (v.11.5) Domain Page 502 Bad Gateway Nginx Error

SahinS

Basic Pleskian
Hi Plesk!

I can be login to Plesk Panel. No problem. But, i can not be login domain detail page. Because: 502 Bad Gateway Nginx

I do, stop vs. restart. But problem continues.
"Services Management -> Reverse Proxy Server (nginx) | stop vs. restart

/var/log/nginx/error.log
(folder p. 755 file p.644)
2014/03/07 05:39:01 [emerg] 2816#0: open()
"/var/www/vhosts/system/sitename.com/logs/proxy_access_ssl_log" failed (13: Permission denied)

2014/03/07 05:39:01 [emerg] 2816#0: open()
"/var/www/vhosts/system/sitename.com/logs/proxy_access_log" failed (13: Permission denied)

What can I do? Thank you!
 
Dear #Azurel

Yes, source of the problem: it is not. But, what is this problem ?
This is very frustrating! I can not be login domain detail page (Websites and Domains).
 
The NGINX Bad Gateway error usually means that http:// is called when the url should be https://

In Plesk 11 Apache resolved this automatically, but since we have NGINX we need to specify this explicitly. Have you checked your host name? And what happens when you setup another subscription (say plesk.test), can you access that? It doesn't have to exist, a dummy domain should at least let you access the options within Plesk.
 
The NGINX Bad Gateway error usually means that http:// is called when the url should be https://

In Plesk 11 Apache resolved this automatically, but since we have NGINX we need to specify this explicitly. Have you checked your host name? And what happens when you setup another subscription (say plesk.test), can you access that? It doesn't have to exist, a dummy domain should at least let you access the options within Plesk.

Hi @Jay Versluis,

Connection url: "http://..". I would try "https://.." SSL connection error. Because, ssl not installed.
. Have you checked your host name?

Can you explain please?
- Have you checked your host name?
+ How can I do ?
- And what happens when you setup another subscription (say plesk.test), can you access that?
+ another subscription ? mm.. I've added, new subscription and domain but: problem the same..
- It doesn't have to exist, a dummy domain should at least let you access the options within Plesk.
+ How can I do ?

For your response, thank you.
Good work.
 
In addition, error codes.

In addition, error codes.

var/log/nginx/error.log
Null. in ist empty.


var/log/nginx/error.log.1 // folder octal: 0700 file octal: 0644
2014/03/08 05:41:03 [emerg] 4446#0: open() "/var/www/vhosts/system/mymsaterdomain.com/logs/proxy_access_ssl_log" failed (13: Permission denied)
2014/03/08 05:41:03 [emerg] 4446#0: open() "/var/www/vhosts/system/mymsaterdomain.com/logs/proxy_access_log" failed (13: Permission denied)


var/log/sw-cp-server/error.log
...
2014/03/07 21:40:51 [error] 4708#0: *46 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 176.41.216.81, server: , request: "GET /smb/web/view HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "176.227.200.212:8880", referrer: "http://176.227.200.212:8880/admin/subscription/overview/id/1"
2014/03/07 21:52:08 [error] 4708#0: *52 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 176.41.216.81, server: , request: "GET /smb/web/view HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "176.227.200.212:8880", referrer: "http://176.227.200.212:8880/admin/domain/list?context=domains"
2014/03/08 00:09:48 [error] 4708#0: *87 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 176.41.216.81, server: , request: "GET /domains/databases/phpMyAdmin/version_check.php?&_nocache=1394226604690376560 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "176.227.200.212:8880", referrer: "http://176.227.200.212:8880/domains/databases/phpMyAdmin/main.php?token=a8be0d903d4a99b6dc95afee091ad094"
2014/03/08 10:07:53 [error] 4708#0: *159 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 176.43.117.15, server: , request: "GET /smb/web/view HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "mymasterdomain.com:8880", referrer: "http://mymasterdomain.com:8880/admin/domain/list?context=domains"
2014/03/08 10:30:50 [error] 4708#0: *211 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 176.43.117.15, server: , request: "GET /smb/web/view HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "176.227.200.212:8880", referrer: "http://176.227.200.212:8880/admin/domain/list?context=domains"



var/log/httpd/error.log
...
[Sat Mar 08 09:54:02 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sat Mar 08 09:54:02 2014] [notice] Apache/2.2.24 (Unix) DAV/2 mod_fcgid/2.3.9 mod_python/3.2.8 Python/2.4.3 mod_ssl/2.2.24 OpenSSL/0.9.8y mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
[Sat Mar 08 10:06:07 2014] [notice] caught SIGTERM, shutting down
[Sat Mar 08 10:06:09 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
...
[Sat Mar 08 10:06:09 2014] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sat Mar 08 10:06:09 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sat Mar 08 10:06:09 2014] [notice] Apache/2.2.24 (Unix) DAV/2 mod_fcgid/2.3.9 mod_python/3.2.8 Python/2.4.3 mod_ssl/2.2.24 OpenSSL/0.9.8y mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/xsl.so' - /usr/lib/libexslt.so.0: symbol gcry_cipher_setkey, version GCRYPT_1.2 not defined in file libgcrypt.so.11 with link time reference in Unknown on line 0
...
 
Can anybody help here?
I have exactly the same problem with plesk when i tried to add an ssl certificat to one domain.
This is a very bad problem for me because Ineed this certificate to offer payment to my costumers
Im on ubuntu with the latest plesk update...
Please help us !! Im bagging you !
 
It's also a permissions problem (perhaps nginx doesn't run with credentials necessary to perform the same tasks as apache). I'd expect disabling and removing it to fix it though.
 
The important step is that you MUST disable it before uninstalling. If you fail to disable it first then you'll continue to have problems. Did you disable it first and run reconfig?
 
Yep Shall, I done everything you wrote.
I Disabled it and run reconfig. I still have the same error when I do an SSL certificat request " Bad Gateway nginx".

What can I do now ? My online shoppers are waiting for the secured payment... :(
 
There is a bunch of KB articles regarding "Bad Gateway nginx" issue. Have you tried to search and check them?
 
Hi IgorG
I tried everything I found about my issue. A lot of people can't resolve the same issue too.
Here my error message :
2014/03/10 17:07:01 [error] 20169#0: *709 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 79.XXX.. server: , request: "POST /plesk/client@1/domain@1/certificate@new/properties/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "XXX:8443", referrer: "https://XXX:8443/plesk/client@1/domain@1/certificate@new/properties/"
 
Back
Top