I want to use NGINX as a proxy server for my application. My application (say 'abc') is running on port 8000 on my machine. And NGINX is running on the same machine. A part of the configuration looks like:
server {
listen 80;
server_name my.example.net;
location / {
proxy_pass http://localhost:8000/abc;
}
}
The configuration file when used allows me to test my app by using localhost in the address bar. However, http://my.example.net does not work. My app does not load. I get an error that the page could not be found.
Any idea what could be wrong?
my.example.nettwice on theserver_nameline? And does that hostname resolve to the system wherenginxis running on?telnet my.example.net 80will actually reach that system. As for theserver_namething: I think you overlooked that often with and without a leadingwww.is shown. Doesdoes not workmean you get no connection, or the wrong content, or whatever? Please elaborate in your question.