LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Apache error on start! (https://www.linuxquestions.org/questions/linux-general-1/apache-error-on-start-5241/)

DragonClaw 08-08-2001 06:50 PM

Apache error on start!
 
When I start up the Apachectl I get an error:

Can not determine local host name.
Use the ServerName directive to set it manually




Uhh? I'm a complete newbie to Linux so.....I need help

DragonClaw 08-08-2001 07:04 PM

Also I'd like to know how to set it so it starts Apache on startup


/dir/to/apache/bin/apachectl start

where do I put that to start it up on startup?

notsoevil 08-08-2001 10:27 PM

If apache is just running on your home network (or just for a single Linux computer), set ServerName to be the IP address of your box, like so:

# On a home network
ServerName 192.168.0.15
# Or, just for itself
ServerName 127.0.0.1
# Or, just for itself
ServerName localhost

Choose an appropriate ip for home network, if that is your set up. If this is for a "live" webserver, your ServerName will be your fully qualified domain name.

You'll make this edit in the httpd.conf file

As for starting Apache automagickally, a simple thing to do would be add '/dir/to/apache/bin/apachectl start ' to the end of your rc.local file. You could also set up the appropriate scripts in rc.d and suc, but doing the previous will get the job done.

funkup 08-09-2001 04:41 AM

you can also set it to the hostname of your pc if you have one

so when you enter in the name it pops up with your web server homepage

punt 08-09-2001 09:17 AM

you can also try this. this has code that i used in order to get my httpd to work upon startup:

http://www.linuxdoc.org/LDP/solrhe/S...p29sec247.html

DragonClaw 08-09-2001 11:34 AM

I found out the reason it did this was the httpd.conf it created on configuration had the # before the servername, all I had to do was delete the # and it was fine. Thanks a lot guys! :D


All times are GMT -5. The time now is 12:06 AM.