Question Content:
I have installed October CMS on CentOS 7 and am using Nginx as a reverse proxy. I am encountering a 502 Bad Gateway error when trying to access the admin panel via a public IP.
Environment Information:
Operating System: CentOS 7
Nginx Version: 1.20.1
PHP Version: 8.0.30
October CMS Development Server: Running on 127.0.0.1:9092
Configuration File:
http://117.72.95.12/admin/backend/auth, which returns a 502 Bad Gateway error.
The Nginx logs show the following error:
2024/08/02 19:27:28 [error] 9147#9147: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 27.151.43.174, server: _, request: "GET /admin HTTP/1.1", upstream: "http://127.0.0.1:9092/admin", host: "117.72.95.12:9001"
Request for Help:
How can I fix the redirection issue that leads to the 502 Bad Gateway error?
Is there a specific configuration I should use in Nginx to properly handle these redirects for October CMS?
Question Content: I have installed October CMS on CentOS 7 and am using Nginx as a reverse proxy. I am encountering a 502 Bad Gateway error when trying to access the admin panel via a public IP.
Environment Information:
Operating System: CentOS 7 Nginx Version: 1.20.1 PHP Version: 8.0.30 October CMS Development Server: Running on 127.0.0.1:9092 Configuration File:
The Nginx configuration file is as follows:
nginx server { listen 9001;
} Behavior Observed:
When accessing http://117.72.95.12:9001/admin, I am redirected to:
http://117.72.95.12/admin/backend/auth, which returns a 502 Bad Gateway error. The Nginx logs show the following error: 2024/08/02 19:27:28 [error] 9147#9147: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 27.151.43.174, server: _, request: "GET /admin HTTP/1.1", upstream: "http://127.0.0.1:9092/admin", host: "117.72.95.12:9001" Request for Help:
How can I fix the redirection issue that leads to the 502 Bad Gateway error? Is there a specific configuration I should use in Nginx to properly handle these redirects for October CMS?