apache2virtual-hosts

Point a local domain to localhost:3000


Hey, I would love to point a local domain to localhost:3000 or other ports on which I am running my Wubrick instances (for Rails)

I can not find an apache2 config to point a local domain to these wubrick instances (or simply localhost:3000). Can some one please help me with that?

Regards,
Nikhil Gupta


Solution

  • OK. Found the solution, as below:

    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName rails.new
        ServerAlias www.rails.new rails
        PassengerEnabled Off
        ProxyPass / http://127.0.0.1:3000/
        ProxyPassReverse / http://127.0.0.1:3000/
    </VirtualHost>