I have a reverse proxy setup that works great, as long as there's something after the root URL. Meaning, if I go to "http://mail.mydomain.com:4400/login_here" it works fine. If I attempt to go to "http://mail.mydomain.com:4400" the destination is not found. And the error lists the internal port and adds the extra URL information (http://mail.mydomain.com:400/login_here). Below is my config. What am I doing wrong? Or, is this a standard limitation?
server {
listen *:4400;
server_name mail.mydomain.com;
error_log syslog:server=192.168.0.200:6514 debug;
access_log syslog:server=192.168.0.200:6514,facility=local7,tag=nginx,severity=info;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://192.168.0.100:400/;
}
}
server {
listen *:4400;
server_name mail.mydomain.com;
error_log syslog:server=192.168.0.200:6514 debug;
access_log syslog:server=192.168.0.200:6514,facility=local7,tag=nginx,severity=info;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://192.168.0.100:400/;
}
}