I finally got this working (with ipchains).  It goes something like this:

Decide on a separate set of port numbers for each virtual host.  I start
with the admin user's UID, and add 10000.  So have the first httpd listen on
11000, and the second listen on 11400, etc.

--- Set up ipchains ---
--- ipchains.in ---
:input ACCEPT
:forward ACCEPT
:output ACCEPT
:web -
-A input -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 80:80 -p 6 -j web
-A web -s 0.0.0.0/0.0.0.0 -d 63.209.12.83/255.255.255.255 80:80 -p 6 -j
REDIRECT 11000
-A web -s 0.0.0.0/0.0.0.0 -d 63.209.12.85/255.255.255.255 80:80 -p 6 -j
REDIRECT 11100
--- /ipchains.in ---

Then execute:
# ipchains-restore ipchains.in

In your first vhost, do this:

--- httpd.conf for VS 1.  Includes 2 name based virtual hosts ---
Listen 11000
NameVirtualHost *:80
<VirtualHost _default_:80>
     # This one gets called when no other namevirtualhost is called.
</VirtualHost>
<VirtualHost *:80>
     ServerName server1.vs1.com
     ServerAlias *.server1.vs1.com
     CustomLog /my/log/file/server1.log
</VirtualHost>
<VirtualHost *:80>
     ServerName server2.vs1.com
     ServerAlias *.server2.vs1.com
     CustomLog /my/log/file/server2.log
</VirtualHost>

--- httpd.conf for VS 2.  Includes 2 name based virtual hosts ---
Listen 11100
NameVirtualHost *:80
<VirtualHost _default_:80>
     # This one gets called when no other namevirtualhost is called.
</VirtualHost>
<VirtualHost *:80>
     ServerName server1.vs1.com
     ServerAlias *.server1.vs1.com
     CustomLog /my/log/file/server1.log
</VirtualHost>
<VirtualHost *:80>
     ServerName server2.vs1.com
     ServerAlias *.server2.vs1.com
     CustomLog /my/log/file/server2.log
</VirtualHost>

Notes:
   * The ipchains file needs to be updated
     for each VS.  You need to ensure that
     ipchains-restore is called on each boot,
     and that ipchains gets called on each
     vs creation and deltion.  And that
     the proper port is used in the httpd.conf
     file.

   * Yes, the VirtualHost directives are
     correct.  Listed at port 80.  Don't ask
     my why, but it definitely doesn't work
     as the same port as the Listen directive.


Hope this helps.

-Caleb

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kelly French
> Sent: Tuesday, May 01, 2001 7:05 PM
> To: [EMAIL PROTECTED]
> Subject: Apache and logging
>
>
> I know the reasons behind the fact that you cant detailed apache logs with
> freevsd due to the redirect.
>
> How does one get detailed logs?
>
> Kelly
>
>
>

Reply via email to