Hi guys,
I am trying to run a next js application on port 80 but it is not giving me permission even after turning off nginx to free the port. Please help!
Hi guys,
I am trying to run a next js application on port 80 but it is not giving me permission even after turning off nginx to free the port. Please help!
You can’t run nodejs on port 80.
Run it on port 3000 and use a nginx proxy template that forwards traffic to that port.
Hello Eris, thank you for your quick response. But could you please post a link or something on how to use nginx proxy template please?
Thank you guys! cheers!
I was able to handle this requirement by:
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
even though the config says do not change this file, this is the only thing I tried that worked.
You should use a template:
Instead updating the config file but it the idea is the same…