[Ruby] Multiple Domains with Mongrel + Apache
Jordan Isip
jordanisip at yahoo.com
Wed Feb 28 16:36:31 PST 2007
Hi All,
I'm attempting to setup a couple domains on my VPS (rimuhosting) that runs mongrel with Apache. I am currently using one mongrel per domain (no clusters yet) so based off of articles I read, I setup the following virtual hosts on httpd.conf:
<VirtualHost *:80>
ServerName myapp1.com
ServerAlias www.myapp1.com
ProxyPass / http://www.myapp1.com:8000/
ProxyPassReverse / http://www.myapp1.com:8000
ProxyPreserveHost on
</VirtualHost>
<VirtualHost *:80>
ServerName myapp2.com
ServerAlias www.myapp2.com
ProxyPass / http://www.myapp2.com:8001/
ProxyPassReverse / http://www.myapp2.com:8001
ProxyPreserveHost on
</VirtualHost>
The mongrel service on 8000 and 8001 are both running and I set both domains to point to the the same IP address. Now when I go to myapp1.com, it works perfectly, however, if I go to myapp2.com, it looks like it is using port 8000 instead of 8001 like it should be (myapp2.com:8001 works).
I don't have much experience with all this server stuff so I probably missed something....any ideas? Is there something else I need to configure...maybe in environment.rb or routes.rb?
Thanks in advance.
Jordan
More information about the Ruby
mailing list