HTTPD.conf question

Scot L. Harris webid at cfl.rr.com
Fri Nov 11 19:00:05 UTC 2005


On Fri, 2005-11-11 at 13:15, Michael Shaw wrote:
> Scot L. Harris wrote:
> 
> >On Fri, 2005-11-11 at 13:08, Michael Shaw wrote:

> >>I also put entries for default and michael after 192.168.1.25 in my 
> >>hosts file.  However, when I eneter either default or michael in my Web 
> >>browser I get eh FC4 test page, even though I have a <h1>Hello 
> >>World</h1> index.html file in /home/michael/public_html/www.
> >>
> >>What am I missing?
> >>    
> >>
> >
> >Did you restart httpd?
> >
> >service httpd restart
> >

> >
> Thanks.  I thought the GUI tool did that, for whatever reason.  Now I 
> get a 403 error on server Michael. 


Check the permissions on the /home/michael/public_html/www directory and
the path to it.  

You are using the same IP address for both servers.  In IP based virtual
hosting I think you should be using different IP addresses.

If you are trying to do named based virtual hosts then you probably want
something along the lines of:


# Virtual host default
<VirtualHost www.default.com>
     ServerName www.default.com
    DirectoryIndex index.php index.html index.htm index.shtml
    LogLevel debug
     HostNameLookups off
</VirtualHost>

# Virtual host michael
<VirtualHost www.michael.com>
     DocumentRoot /home/michael/public_html/www
     ServerAdmin mshaw at dowco.com
     ServerName www.michael.com
    DirectoryIndex index.html index.htm index.shtml
</VirtualHost>

Then have things setup in your /etc/hosts files or DNS for those names
pointing to the same IP address.

This allows you to use one IP address for all the sites.  They get
directed to the correct document root based on the name used in the
browser.





More information about the fedora-list mailing list