You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dov Rosenberg <do...@conviveon.com> on 2004/10/13 14:56:18 UTC

[users@httpd] Multiple Vhost Question

I am trying to configure Apache 2.0.50 to support a bunch of very similar
sites using the mod_vhost_alias directive. Here is a copy of my VirtualHost
directive currently:

<VirtualHost *>
DocumentRoot "/home/conviveon/www/cc"
#DirectoryIndex dov.jsp
VirtualDocumentRoot /home/conviveon/jrun4/servers/wip/cc/sites/%2
ServerName cc.conviveon.com
ServerAlias wip1.conviveon.com wip2.conviveon.com wip3.conviveon.com
wip4.conviveon.com wip5.conviveon.com wip6.conviveon.com wip7.conviveon.com
wip8.conviveon.com wip9.conviveon.com wip10.conviveon.com
wip11.conviveon.com wip12.conviveon.com www.arcdoyle.com
 RewriteEngine on
    #RewriteLog rewrite.log
    #RewriteLogLevel 9
    #RewriteRule ^/ /cc/index?page=home
    RewriteRule ^/cc/index/(.*)/id/(.*)/$ /cc/index?page=$1&id=$2
    RewriteRule ^/cc/index/(.*)/id/(.*)$ /cc/index?page=$1&id=$2
    RewriteRule ^/cc/index/(.*)/year/(.*)/$ /cc/index?page=$1&year=$2
    RewriteRule ^/cc/index/(.*)/year/(.*)$ /cc/index?page=$1&year=$2
    RewriteRule ^/cc/index/(.*)/topic/(.*)/$ /cc/index?page=$1&topic=$2
    RewriteRule ^/cc/index/(.*)/topic/(.*)$ /cc/index?page=$1&topic=$2

    RewriteRule ^/cc/index/(.*)/topic/(.*)/id/(.*)/$
/cc/index?page=$1&topic=$2&id=$3
    RewriteRule ^/cc/index/(.*)/topic/(.*)/id/(.*)$
/cc/index?page=$1&topic=$2&id=$3
    RewriteRule ^/cc/index/(.*)/$ /cc/index?page=$1
    RewriteRule ^/cc/index/(.*)$ /cc/index?page=$1
Redirect 301 /index.html http://cc.conviveon.com/cc/index?page=home
Redirect 301 /admin
http://admin.conviveon.com/CASAdmin/WebObjects/CASAdmin.woa?repository=CC
  CustomLog "|/usr/local/apache2/bin/rotatelogs
/home/conviveon/www/cc/logs/%Y-%m-%d-cc-access.log 86400" combined
Redirect 301 /stats http://stats.conviveon.com
ErrorLog /home/conviveon/www/logs/cc-errorlog
  <IfModule mod_jrun20.c>
        JRunConfig Verbose false
        JRunConfig Apialloc false
        JRunConfig Ignoresuffixmap false
        JRunConfig Serverstore
/home/conviveon/jrun4/lib/wsconfig/9/jrunserver.store
        JRunConfig Bootstrap 216.199.173.3:51003
        #JRunConfig Errorurl <optionally redirect to this URL on errors>
        AddHandler jrun-handler .jsp .jws
    </IfModule>
</VirtualHost>

I am trying to configure all of the ServerAliases (they are going to be real
domains as soon as I can figure out how to do this) to be multiple hosted.
The problem I have is that the URL needs to look like:

    http://<domainname>/cc/index.jsp where cc is the servlet context of the
web app that handles the site. Maybe I need to do another URL rewrite rule,
any help is appreciated. Thanks in advance.


-- 
Dov Rosenberg
Conviveon Corporation
370 Centerpointe Circle, suite 1178
Altamonte Springs, FL 32701
http://www.conviveon.com
dov@conviveon.com
AOL IM: dovrosenberg
(407) 339-1177 x102
(407) 339-6704 (fax)
(800) 475-9890
(407) 310-8316 (cell)


Re: [users@httpd] Multiple Vhost Question

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 13 Oct 2004 08:56:18 -0400, Dov Rosenberg
<do...@conviveon.com> wrote:

>  I am trying to configure all of the ServerAliases (they are going to be
> real domains as soon as I can figure out how to do this) to be multiple
> hosted. The problem I have is that the URL needs to look like:
>  
>      http://<domainname>/cc/index.jsp where cc is the servlet context of the
> web app that handles the site. Maybe I need to do another URL rewrite rule,
> any help is appreciated. Thanks in advance.

I can't really decipher exactly what you are trying to do.  What is
supposed to change when the domainname changes?  This doesn't sound
like something the mod_vhost_alias is going to be good for.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org