...
Most websites have a domain name attached to them. Apache is looking for this on startupstart-up. There actually is not much documentation on exactly what is happening here. If you happen to know then please let me know via comments on this page. Based on my reading here is how to resolve the error.
Warning |
---|
Roderick, try to change all this into a one liner that will take the hostname and append it to the end of http.conf. Hint to write out the hostname. Hint to append to end of the file. Hint to run multiple commands with sudo. |
First use the hostname command to determine the name of your system,
Code Block | ||
---|---|---|
| ||
hostname # Determine name of your system. In this example this server will return tinman
tinman |
Next load the empty /etc/apache/httpd.conf into an editor of your choice,
Code Block | ||
---|---|---|
| ||
sudo ne /etc/apache2/httpd.conf |
Add to the very top of the httpd.conf fileAs of June 5, 2012 I believe that with the more recent build of Ubuntu 12 and Apache 2.2.22,
Code Block | ||
---|---|---|
| ||
sudo bash -c "hostname >> /etc/apache2/conf.d/name" |
Note | |||||
---|---|---|---|---|---|
The following will also work too, though I think that localhost may or may not be as desirable depending on if you get the server status name... look into this later,
|
With older versions of Apache and Ubuntu (I need to track down where this change) you can instead (still to determine if conf.d/name would still work) use httpd.conf,
Code Block | ||
---|---|---|
| ||
ServerName tinmansudo bash -c "hostname >> /etc/apache2/httpd.conf" |
Test
Verify that the Apache Web Server is running first by hitting your server's IP Address. If you do not know your ip address, at the console type,
...