Question

DNS redirection

Posted December 22, 2013 3.4k views
I was able to get the redirection to work but it only works if the port is attached to the website(example: www.website.com:3000). If I do not put the port in the it gives me a "504 Gateway Time-out" with "nginx". How do I get it to where it includes the port so you do not have to type the port? I am not sure if it has to do with the domain host or maybe or nginx.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers
Please pastebin your nginx config. Is your app running on port 3000?
webrick is running it on 3000 yes.

Here is http://pastebin.com/N9rkwtY2
Figured it out. Anyone else who has the problem in the etc/nginx/nginx.config file.

upstream app_server { server 127.0.0.1:8080 fail_timeout=0; }

I changed the port from 8080 to 3000 which is used by WEBrick
Submit an Answer