Sunday, 7 October 2012

Virtual Host in apache

Virtual Host in apache

Configures a DNS server to allow URL's of the form http://www.example.com and http://example.com - both URL's will get to the same web server.
you will have a definition in your httpd.conf file something like this:

<VirtualHost 10.10.0.23>
    ServerAdmin webmaster@example.com
    DocumentRoot /path/to/web/root
    ServerName www.example.com
    ServerAlias example.com
    # if logging per host - use a single file
        ErrorLog logs/error.log
    CustomLog logs/access.log common
</VirtualHost>

No comments:

Post a Comment