Apache/Red Hat Hostname Problem!

Marc Chung mchung@asu.edu
Mon, 12 Jun 2000 16:47:40 -0700 (MST)


In Apache's httpd.conf file.

do a search for `ServerName' 

You should find at least once instance of it under "Section 2"

if you Virtually host other domains (virtual or real ip's) 

you have to specify the ServerName within the VirtualHost

ie

#domain.com
<VirtualHost 123.456.789.123>
    ServerAdmin dude@dude1.com
    DocumentRoot /home/dude/public_html
    Options Indexes Includes FollowSymLinks 

    ServerName domain.com

    ErrorLog /home/dude/public_html/logs/domain-error_log
    CustomLog /home/dude/public_html/logs/domain-access_log COMBINED
    ErrorDocument 500 /error/500-errdoc.php
    ErrorDocument 404 /error/404-errdoc.php
    ErrorDocument 403 /error/403-errdoc.php
    ErrorDocument 401 /error/401-errdoc.php
</VirtualHost>
#end

If you're using ip-less virtual hosting, then you'll need to 
use the NameVirtualHost directive too =)

It's a line before your <VirtualHost> directives that goes

#nameVirtHost
NameVirtualHost 123.456.789.123
#end

Hope that helped..


-- 
Marc Chung [mchung@asu.edu]
"I went to the woods because I wanted to live deliberately"


On Mon, 12 Jun 2000, Ryan Denke wrote:

> I recently setup and had Apache running on my Linux RedHat 6.2 server.
> Then I changed some config files to virtually host another domain, but
> never tested the changes. Some time later, the PC locked up and I had to
> do a hard reset. Since then, Apache hasn't worked. When I try to run it,
> I get the following error:
> 
> Starting httpd: httpd: cannot determine local host name.
> Use the ServerName directive to set it manually.
> 
> The hostname and uname commands return the correct hostname, so I'm
> wondering what is going wrong? I'm pretty sure I've undone all of the
> changes I made since I last had it working, I'm thinking that the hard
> reset might have corrupted a file. Anyone have any ideas?
> 
> Ryan Denke
> 
> 
> _______________________________________________
> Plug-discuss mailing list  -  Plug-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>