> -----Original Message-----
> From: Paul Nevin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 10, 2001 7:03 AM
> To: [EMAIL PROTECTED]
> Subject: pf or apache redirect?
>
> within a private network range? Or is this something that is usually
> done within Apache VirtualHosts directives? Confused? So am I!
[...]
> The catch is I only have one registered "real" ip and that is
> already in
> use by my official web site. Re-directs based only on http requests
> would be the only way I can see to make this work.
>
> I can not find any information on doing this with ipf/pf so I assume
> there must be some sort of Apache directive that can do this within my
> existing web server.
There is one, and as i think well documented on apache.org.
The magic word is VirtualHosts. You can define a lot of virtualhosts in your
httpd.conf (look the generic example).
When you are using different virtual webservers on the same ip you must use
another very important tag in httpd.conf
With 'NameVirtualHost xxx.yyy.zzz.abc' you tell Apache that your
VirtualHosts on the same IP (xxx.yyy.zzz.abc) must be distinguished by their
domain-name!
Apache will look up the ServerName / ServerAlias directives in your
configuration and deliver the right content.
e.g.
NameVirtualHost xxx.yyy.zzz.abc
<VirtualHost xxx.yyy.zzz.abc>
DocumentRoot /path/to/html
ServerName clientdomain.com
ServerAlias www.clientdomain.com
...additional Tags
</VirtualHost xxx.yyy.zzz.abc>
<VirtualHost>
DocumentRoot /path/to/html
ServerName yourdomain.com
ServerAlias www.yourdomain.com
...additional Tags
</VirtualHost>
This will only work on the same ip if you add a NameVirtualHost
xxx.yyy.zzz.abc - otherwise only one VirtualHost will work.
Note: You will have to add some more Tags within the VirtualHost directive,
e.g. to allow CGI in the VH's DocRoot.
This has also an security advantage. You can allow/deny specific functions
to any single VirtualHost without affecting the others.
For more Info look http://httpd.apache.org/docs/vhosts/index.html or mail
me.
Greetings
Boris Koslowski