I am experiencing some strange problems with my reverse proxy.
My setup looks like this: setup
Now, hosts inside my internal network can reach the app running on localhost:3000
on server srv1.my.domain.org
, so I know the config is working. But as soon as I try and access the app from outside the network (over gateway.my.domain.org
) I just see the NGINX test page. I do not understand why, since this config I have done for multiple other apps, and they are working.
NOTE: The server_name
is the same as the hostname of the physical server.
Here are the configs:
gateway.my.domain.org
path: /etc/nginx/conf.d/app.my.domain.org.conf
upstream srv {
server srv1.my.domain.org;
}
server {
listen 443;
server_name gateway.my.domain.org;
ssl on;
ssl_certificate /.../fullchain.pem;
ssl_certificate_key /.../privkey.pem;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/gateway.access.log;
error_log /var/log/nginx/gateway.error.log;
client_max_body_size 150M;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://srv;
proxy_read_timeout 90;
}
}
srv1.my.domain.org
path: /etc/nginx/sites-enabled/app
server {
listen 80;
server_name srv1.my.domain.org;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:3000;
}
}