httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Pasher <just...@newmediagateway.com>
Subject Re: [users@httpd] pointing documentroot to a file instead of a directory
Date Mon, 22 Sep 2008 18:52:31 GMT
Adam Williams wrote:
> Davide Bianchi wrote:
>> Adam Williams wrote:
>>   
>>> Is there a way or a command like documentroot but points to a file
>>> instead of a directory?
>>>     
>>
>> No. You can use the DirectoryIndex directives to specify which file to
>> consider the 'main' page (in place of index.html). But the DocRoot is a
>> directory.
>>
>> Davide
>>
>>   
>
> so basically the only solution is to use a documentroot of /pubs/ma 
> and /pubs/jmh and move ma.html to /pubs/ma/index.html and jmh.html to 
> /pubs/jmh/index.html?

If you REALLY want multiple vhosts to share the same DocumentRoot, set 
the following:

<VirtualHost *>
        ServerName msarchaeology.com
        ServerAlias *.msarchaeology.com
        DocumentRoot /var/www/sites/mdah-live/pubs
        DirectoryIndex ma.html
        UserDir disable
</VirtualHost>

<VirtualHost *>
        ServerName journalmshistory.com
        ServerAlias *.journalmshistory.com
        DocumentRoot /var/www/sites/mdah-live/pubs
        DirectoryIndex jmh.html
        UserDir disable
</VirtualHost>

<VirtualHost *>
        ServerName journalmshistory.org
        ServerAlias *.journalmshistory.org
        DocumentRoot /var/www/sites/mdah-live/pubs
        DirectoryIndex jmh.html
        UserDir disable
</VirtualHost>



-- 
Justin Pasher

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message