I configured https with letsencrypt in nginx, and accessing by ip in most cases if it redirects to https, but if I enter specifically by this route it http://11.255.123.0:4040/login
accesses unencrypted, any suggestions? I leave here the nginx configuration:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name mydomain.com www.mydomain.com;
return 301 https://$server_name$request_uri;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:4040/;
proxy_set_header Host $http_host;
proxy_redirect off;
}
I've been investigating more and all the ones that have to do with the active docker images are without redirection /parse :1337 and :4040
Port 4040 is not being served by nginx, but is the port that the app server is running on.
What you should do is have the firewall limit all requests to 4040 except on the loopback interface (127.0.0.1)