one more (I'm sorry)

Daniel R . Kilbourne daniel.kilbourne@voyager.net
Wed, 12 Jul 2000 05:08:56 -0400


put something like this in your httpd.conf file (usually /usr/local/apache/conf/httpd.conf):



# www.netophilia.com
<VirtualHost www.netophilia.com>
        ServerAdmin root@netophilia.net
        DocumentRoot /export/home/netsite/httpd/netophilia
        ServerName www.netophilia.com
        ServerAlias netophilia.com
        ErrorLog /export/home/netsite/logs/netophilia.com/errors
        CustomLog /export/home/netsite/logs/netophilia.com/access "%h %l %u %t \"%r\"  %s %b \"%{Referer}i\" \"%{User-Agent}i\""
        <Directory /export/home/netsite/httpd/netophilia/cgi-bin>
        Options +ExecCGI
        </Directory>
</VirtualHost>

# drk.voyager.net
<VirtualHost drk.voyager.net>
        ServerAdmin root@netophilia.net
        DocumentRoot /export/home/netsite/httpd/drk
        ServerName drk.voyager.net
        ErrorLog /export/home/netsite/logs/drk.voyager.net/errors
        CustomLog /export/home/netsite/logs/drk.voyager.net/access "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""
        <Directory /export/home/netsite/httpd/drk/cgi-bin>
        Options +ExecCGI
        </Directory>
</VirtualHost>


basically, the key parts are:

<VirtualHost blah> - blah is xxx.mydomain.com
DocumentRoot - /path/to/somedir/somedir
and of course the error log in case it does not work :)

right now we do this for about 300+ sites on one box, works very well


let me know if you need more




Mike Szumlinski wrote:
> Okay, is it possible to set up xxx.mydomain.com to go to /somedir/somedir 
> instead of the server root when I only have 1 IP address?  Currently 
> www.mydomain.com goes to the main page, but if I wanted to setup 
> different aliases that go to a different directory like xxx.mydomain.com 
> --> www.mydomain.com/xxx
> 
> Sorry for the bombardment of annoying questions all at once.
> 
> -Mike
> 
> -=--===---===---===---===-=-
> |Mike Szumlinski           |
> |Michigan State University |
> |A26079565                 |
> -=--===---===---===---===-=-
> "The future is no place to place your better days" -DMB
> 
> 
> 
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user

-- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Daniel R. Kilbourne
daniel.kilbourne@voyager.net
Voyager.net Network Engineer

^^^^^^^^^^^^^^^^^^^^^^^^^^^^