httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry Carmen <>
Subject Re: [users@httpd] Set multiple DocumentRoot
Date Fri, 26 Oct 2012 17:35:25 GMT
On 10/26/2012 06:02 AM, jupiter wrote:
> Hi,
> I need to set DocumentRoot to two directories, one for development and
> one for testing. But the server has only one IP address, and there is
> no DNS. Is it possible? If so, please give an example.

You can use multiple virtualhosts on one IP address by creating the 


And configuring your http.conf file with:

UseCanonicalName Off
VirtualDocumentRoot /var/www/html/%0

You can add the two hosts to your /etc/hosts file to make them resolve 
properly from your machine, if you can't update DNS.

Example: /etc/hosts   localhost dev prod


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message