LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-08-2001, 07:50 PM   #1
DragonClaw
LQ Newbie
 
Registered: Jul 2001
Location: United States
Distribution: RedHat 7.1
Posts: 11

Rep: Reputation: 0
Unhappy 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
 
Old 08-08-2001, 08:04 PM   #2
DragonClaw
LQ Newbie
 
Registered: Jul 2001
Location: United States
Distribution: RedHat 7.1
Posts: 11

Original Poster
Rep: Reputation: 0
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?
 
Old 08-08-2001, 11:27 PM   #3
notsoevil
Member
 
Registered: May 2001
Location: Louisville, Kentucky, USA
Distribution: RedHat ES
Posts: 120

Rep: Reputation: 15
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.
 
Old 08-09-2001, 05:41 AM   #4
funkup
LQ Newbie
 
Registered: Jul 2001
Location: lancashire, uk
Distribution: mdk 8, seawolf, openbsd.
Posts: 29

Rep: Reputation: 15
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
 
Old 08-09-2001, 10:17 AM   #5
punt
Member
 
Registered: Jun 2001
Distribution: Fedora 22
Posts: 371

Rep: Reputation: 30
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
 
Old 08-09-2001, 12:34 PM   #6
DragonClaw
LQ Newbie
 
Registered: Jul 2001
Location: United States
Distribution: RedHat 7.1
Posts: 11

Original Poster
Rep: Reputation: 0
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache wont start. Never seen this error before mpriddy Linux - Software 1 10-12-2004 04:44 PM
Apache start error varunbihani Linux - Software 1 05-06-2004 02:39 PM
apache start error akurtis Linux - Newbie 6 12-03-2003 12:14 AM
apache start error esteeven Linux - Software 4 09-04-2003 06:52 PM
apache start error automicro Linux - Newbie 2 08-01-2003 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration