linux poison RSS
linux poison Email

Virtual Hosting using Apache

If you want to maintain multiple domains/hostnames on your machine you can setup VirtualHost containers for them.
Please see the documentation at URL:http://www.apache.org/docs/vhosts/ for further details before you try to setup virtual hosts.

Sample


FQDN Document Root
Host Name www.hell.com
(192.168.0.1)
/var/www/html/
Virtual Host Name server.hell.com
(192.168.0.1)
/var/www/server/


BIND Setup

  • Add an Alias Name into BIND DB file
    www             IN      A       192.168.0.1
    server IN CNAME www

    Apache Setup

  • httpd.conf
    ...
    NameVirtualHost 192.168.0.1:80
    DocumentRoot /var/www/html/ ServerName _default_

    DocumentRoot /var/www/server/ ServerName server.hell.com
    ...


  • 0 comments:

    Post a Comment

    Related Posts with Thumbnails