httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] pointing documentroot to a file instead of a directory
Date Mon, 22 Sep 2008 19:33:43 GMT
Adam Williams wrote:
> Is there a way or a command like documentroot but points to a file 
> instead of a directory?  I'm running Apache httpd 2.2 on fedora 9 linux 
> and have a the files /pubs/ma.html and /pubs/jmh.html, but when I tried 
> documentroot I get the error upon running apachectl start:
> 
> Warning: DocumentRoot [/var/www/sites/mdah-live/pubs/ma.html] does not 
> exist
> Warning: DocumentRoot [/var/www/sites/mdah-live/pubs/jmh.html] does not 
> exist
> Warning: DocumentRoot [/var/www/sites/mdah-live/pubs/jmh.html] does not 
> exist
> 
> 

Try this instead :

> 
> <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
          ServerAlias *.journalmshistory.org
>        DocumentRoot /var/www/sites/mdah-live/pubs
	 DirectoryIndex jmh.html
>        UserDir disable
> </VirtualHost>
> 
and save yourself one VirtualHost.
Now, that's assuming that apart from this homepage, your virtual servers 
share *everything* under your DocumentRoot (if there is anything else).



---------------------------------------------------------------------
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