i use nginx as reverse proxy and proxying some of our webservers, application systems etc. Now i have a application, that is accessable via https on port 2222. So i created a redirect as i did for other systems.
My problem is, that i can't reach the application on that port. The connection is refused. My firewall will allow this connection, we checked this. Nginx is also listening on that port.
The Nginx configuration is:
server {
listen 2222;
server_name server.hostname.de;
ssl_certificate /etc/nginx/cert.cer;
ssl_certificate_key /etc/nginx/key.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://server.hostname.de:2222/;
}
}
Any idea what could be wrong here?
Thanks in advance
server
block (andupstream
if you defined it)ss -lnpt | grep 2222
to confirm what is listening on that port and which IP addresses are used for that. You may mask public IPs, but better don't do anything with private ones. (I'll update my answer below if that makes it more clear to me.)