I'm running the latest version of ubuntu, 12.04.
I'm trying to access my ruby on rails app via a faux domain, as specified in my /etc/hosts file:
127.0.0.1 myapp.vhost 127.0.0.1 www.myapp.vhost
and as far as apache goes, I've added my virtual host config:
<VirtualHost *:80> ServerName myapp.vhost ServerAlias *.myapp.vhost ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ ProxyPreserveHost on </VirtualHost>
to the file /etc/apache2/sites-available/myapp.conf
and in /etc/apache2/apache2.conf, I've added
Include sites-available/ Include sites-available/myapp.conf
to the bottom of the file.
I can restart apache, fin without error using this command:
sudo /etc/init.d/apache2 force-reload
The problem is that when I navigate to http://myapp.vhost in my browser, I get a 404 error.
What am I doing wrong here?
Note: My ruby on rails server is running on port 3001, with the -p3001 option of script/server