[Mongrel] reg vhost in apache

Andrei Maxim andrei at andreimaxim.ro
Thu Nov 22 06:56:04 EST 2007


Shiva,
The easiest way to do that is to create a new vhost for sutrateam that
redirects to http://sutra/advanced-search-page.


On 11/22/07, Shiva Kumaran <lists at ruby-forum.com> wrote:
>
> Hi all,
>
>    I am facing one problem in configuration of httpd-vhosts.
> my requirment is if url comes from servername (i.e http://sutra) it
> should redirect to my home page.if url comes from serverAlias(i.e
> http://sutrateam) it should go to advance search page....if any one
> knows how to do pls help me
>
> below file is my vhost file
>
> <VirtualHost *:80>
>       ServerName sutra
>       ServerAlias srishtisutra
>       ServerAlias sutrateam
>       ServerAlias sutrasrishti
>       DocumentRoot D:/project/sutra/public
>      <Directory "D:/project/sutra/public">
>        Options FollowSymLinks
>        AllowOverride None
>        Order allow,deny
>        Allow from all
>      </Directory>
>      RewriteEngine On
>      # Check for  maintenance file and redirect all requests
>      RewriteCond  %{DOCUMENT_ROOT}/system/maintenance.html -f
>      RewriteCond  %{SCRIPT_FILENAME} !maintenance.html
>      RewriteRule  ^.*$ /system/maintenance.html [L]
>      # Rewrite index to check for static
>      RewriteRule ^/$ /index.html [QSA]
>      # Rewrite to check for Rails cached page
>      RewriteRule ^([^.]+)$ $1.html [QSA]
>      # Redirect all non-static requests to cluster
>      RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
>      RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI}
> [P,QSA,L]
> </VirtualHost>
>
>
> with regards
> shiva
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>



-- 
Andrei Maxim
http://andreimaxim.ro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071122/05c7c64d/attachment.html 


More information about the Mongrel-users mailing list