How do I forward domain to open rails ip:port page?

Posted May 23, 2015 4.4k views
Ruby on RailsNginxDNS

Hello, I am just messing around with Ruby on the Rails, so I’ve installed simple app to learn from it, however it runs on domain:3000 port

How do I change it to open on just ?


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.

Submit an Answer
2 answers

Install a webserver and forward requests to port 3000.

Yeah, I have nginx, how do I forward it to 3000?

  • That is easy:

    “`sudo nano /etc/nginx/conf.d/virtual.conf

    Change it to :

    A virtual host using mix of IP-, name-, and port-based configuration

    server {
    listen 80;

    listen *:80;

    server_name  DOMAIN.COM;
    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;


    Save and :
    ```sudo service nginx restart