Nginx starter template not responding
Hi, I've set up a dead simple deployment that looks identical to https://github.com/railwayapp-templates/nginx. I have a bigger repo with a lot of crap in it but one folder that's super simple, literally just a bit of static html
which matches the docker example. the app appears to build just fine and deploy fine
curl -vvv
yields HTTP/1.1 301 Moved Permanently
which is odd.
I am using a railway.app subdomain for public access. I disabled and reenabled a new one to rule out bugginess there. I have disabled private networking. I just want to put one html file on the internet quickly
am I missing something obvious?14 Replies
Project ID:
N/A
send a link to your public domain please
workflow-demo-frontend-production.up.railway.app
(woops, curl http://... yields 503, which sounds right, but still not loading the website)
1. you need to use https
2. what port does nginx listen on?
right, I meant that. I've just set env var PORT to 80, nginx's default, let's try that
perfect
the dockerfile is just
and that did the trick
thanks!
no problem!
might I suggest in the official template including an
nginx.conf
that is set to port 80 by default?the official template comes with a PORT service variable set to 80
I know it's a 2 year old template and there's prob been some changes to the port autodetection or something
ah
railway also does not do any port auto detection
i see that
you are not the first to have this problem, there is a whole docs page on it
https://docs.railway.app/guides/fixing-common-errors