[Ruby] Multiple Domains with Mongrel + Apache
Jordan Isip
jordanisip at yahoo.com
Thu Mar 1 23:53:24 PST 2007
For achieving purposes: After many hours I figured out my problem. I needed to uncomment "NameVirtualHost *:80" in my httpd.conf....*sigh*....
So in the end my virtual host section in my httpd.conf looked like this:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName myapp1.com
ServerAlias www.myapp1.com
DocumentRoot /var/www/myapp1/public
ProxyPass / http://www.myapp1.com:8001/
ProxyPassReverse / http://www.myapp1.com:8001/
ProxyPreserveHost on
</VirtualHost>
<VirtualHost *:80>
ServerName myapp2.com
ServerAlias www.myapp2.com
DocumentRoot /var/www/myapp2/public
ProxyPass / http://www.myapp2.com:8000/
ProxyPassReverse / http://www.myapp2.com:8000/
ProxyPreserveHost on
</VirtualHost>
Welp, onto configuring Mongrel clusters....
Jordan
Jordan Isip <jordanisip at yahoo.com> wrote: 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:
ServerName myapp1.com
ServerAlias www.myapp1.com
ProxyPass / http://www.myapp1.com:8000/
ProxyPassReverse / http://www.myapp1.com:8000
ProxyPreserveHost on
ServerName myapp2.com
ServerAlias www.myapp2.com
ProxyPass / http://www.myapp2.com:8001/
ProxyPassReverse / http://www.myapp2.com:8001
ProxyPreserveHost on
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
_______________________________________________
Ruby at zenspider.com - Seattle.rb non-commercial list
http://www.zenspider.com/seattle.rb
http://www.zenspider.com/mailman/listinfo/ruby
More information about the Ruby
mailing list