[plug] re: Apache virtual host

Sacha Schlegel schlegel at cs.curtin.edu.au
Tue Jun 3 17:50:47 WST 2003


Hi Jon

In my httpd.conf I have:

--------------------------------------------------------

NameVirtualHost 212.243.20.213

# first virtual host: havanawave.com

<VirtualHost 212.243.20.213>
    ServerAdmin webmaster at havanawave.com
    DocumentRoot /home/www-data/www.havanawave.com
    ServerName www.havanawave.com
    ErrorLog /var/log/apache/www.havanawave.com-error.log
    CustomLog /var/log/apache/www.havanawave.com-access.log full
</VirtualHost>

# second virtual host: www.schlegel.li

<VirtualHost 212.243.20.213>
    ServerAdmin webmaster at havanawave.com
    DocumentRoot /home/www-data/sacha.schlegel.li
#   special directory directive for this virtual host.
    <Directory /home/www-data/sacha.schlegel.li>
        AllowOverride AuthConfig
    </Directory>
    ServerName www.schlegel.li
    ErrorLog /var/log/apache/www.schlegel.li-error.log
    CustomLog /var/log/apache/www.schlegel.li-access.log full
</VirtualHost>


# many more.


----------------------------------------------------

Hope this helps.

for apache 1.3: http://httpd.apache.org/docs/
for apache 2:   http://httpd.apache.org/docs-2.0/

They have a section on virtual hosts.

Otherwise there are a couple of apache modules (at
http://modules.apache.org/ ) for mass virtual servers. I think they
basically just look at the directory name and voila thats another
virtual server.

Sacha Schlegel


On Tue, 2003-06-03 at 18:02, Jon Miller wrote:
> I have Apache installed on a RHL72 server.  I would like to know how do I go about setting up a virtual host for 2 private companies using the same ipaddress from the internet?
> In other words, if someone is looking for xyz.com.au (203.111.222.223) they are automatically redirected to ip address 203.111.222.224  
> On the one web server I want to be able to redirect any requests to their server located at 192.168.0.1. Do I do this with the following virtual host directive?
> 
> # <VirtualHost 192.168.0.1>
> #    ServerAdmin admin at domain.com.au
> #    DocumentRoot /var/www/html/public_html
> #    ServerName www.domian.com.au
> #    ErrorLog logs/domain.com.au-error_log
> #    CustomLog logs/domain.com.au-access_log common
> # </VirtualHost>
> 
> Thanks
> 
> 
> Jon L. Miller, MCNE, CNS
> Director/Sr Systems Consultant
> MMT Networks Pty Ltd
> http://www.mmtnetworks.com.au
> 
> "I don't know the key to success, but the key to failure
>  is trying to please everybody." -Bill Cosby
> 
> <!DSPAM:3edc6cf01181797200132329356320080>
-- 
------------------------------------------------
Sacha                                   Schlegel
------------------------------------------------
4 Warwick Str, 6102 St. James, Perth,  Australia
sacha at schlegel.li                www.schlegel.li
public key:            www.schlegel.li/sacha.gpg
------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20030603/1e3c6f45/attachment.pgp>


More information about the plug mailing list