I want to resolve a few domain names locally in my computer. To do this I added in /etc/hosts
the following line:
127.0.0.1 example.com
Then I configured nginx with the following config file example.com.conf
server {
server_name example.com;
client_max_body_size 100M;
ssl_certificate /home/user/certs/example.crt;
ssl_certificate_key /home/user/certs/example.key;
location / {
proxy_pass https://127.0.0.1:3000;
}
listen 80;
}
When I got to example.com I still do not get the access that I need but if I put in example.com:3000 then it all works fine. Why isnt the port number not being correctly parsed in the proxy?
I am using Ubuntu 18.04 and nginx 1.14