• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue 502 Bad Gateway nginx only with HTTPS

Richard18

Basic Pleskian
I'm in the middle of a manual migration from one server to another and I'm having problems getting sites running on HTTPS again.

The sites (mostly WordPress) run fine over HTTP with nginx, but not on HTTPS with nginx.

For example, I can access https://domain/index.php and the page will load but without CSS and images.

If I try and go to https://domain/somefolder/some.file I get a 502 Bad Gateway from nginx.

In the proxy_error.log I see:

2016/08/04 14:53:55 [error] 7183#0: *536 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: xxx.xxx, request: "GET /somefolder/some.file HTTP/1.1", upstream: "https://xxx.xxx.xxx.xxx:7081/somefolder/some.file", host: "xxx.xxx", referrer: "xxx"

I'm fairly certain permissions are OK because the site is served correctly over HTTP, I just get these errors on HTTPS.

I've searched the forum and the plesk support sites and I can't quite find anything exactly like this.

Plesk 12.5.30 #42 Ubunutu 14.04 LTS - PHP is run as FPM application served by nginx
 
I've managed to fix the sites by changing an option in Websites & Domains > Apache & nginx Settings called "Serve static files directly by nginx", I've ticked it and it seems to have made it all work.

To be honest, I don't completely understand what I've done though or why I was getting the error, can anyone still explain it?
 
Back
Top