Answer the question
In order to leave comments, you need to log in
Why doesn't nginx forward the request when specifically specified to listen with a name and port?
server {
listen crowd.***.com:80;
server_name crowd.***.com;
location / {
proxy_pass http://localhost:8095;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
proxy_redirect http://crowd.***.com/ /;
}
}
server {
listen 80;
server_name crowd.***.com;
location / {
proxy_pass http://localhost:8095;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
proxy_redirect http://crowd.***.com/ /;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question