Topic: mongrel + apache2 + Fedora 4 + plesk

Hi:

I have managed to get mongrel to serve an application accessed through a subdomain, like this:

http://sub.domain.com:8000/

My Directory structure is as follows:

httdocs path:
/var/www/vhosts/domain.com/subdomains/sub/httpdocs

rails app path:
/var/www/vhosts/domain.com/subdomains/sub/myrailsapp

At the mongrel site the way to have apache serve as a front end is straight forward(as it should be)but i can't seem to get it to work.

Here is the what I have placed in vhost file for the subdomain:


    ProxyPass / http://sub.domain.com:8000/
    ProxyPassReverse / http://sub.domain.com:8000
    ProxyPreserveHost on

If I type http://sub.domain.com/  I stiil get the default plesk page (I guess apache is still serving from httpdocs), and if I try any of the controller I get page not found.

Either I'm missing something in my steps, or I have done soemthing wrong? I appreciate the help.

Hesham

2

Re: mongrel + apache2 + Fedora 4 + plesk

I'm assuming you restarted apache after making those changes. This is what I have in vhost.conf for a site with a similar setup (it's on centOS, so basically the same). I also have some rewrite rules, but only to handle old URLs. Anyway, the important part:

ProxyRequests Off
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/

Re: mongrel + apache2 + Fedora 4 + plesk

Thanks,

I did retsrat the server after each change (I learned that lessons well a long time ago).

For now, I just use .htaccess to direct the requests to the application that I need. Of course, now that this issue has been resolved I have another one posted in another thread..

Re: mongrel + apache2 + Fedora 4 + plesk

Thanks agian for the solution..I recon my site and it serves multiple apps under each sub-domain easly.

Two recommendations for anyone deploying a rails app for the first time:

[1] READ the documents and toturials and then read them again...
[2] Capistrano. Just invest the time to get this running and your life will be a breeze...almost