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

May 23, 2015 3.1k views
DNS Nginx Ruby on Rails

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 ?


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
Have another answer? Share your knowledge.