LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2010, 11:45 AM   #1
_007
LQ Newbie
 
Registered: Sep 2010
Posts: 4

Rep: Reputation: 0
Question starting and stopping apache


Hello everyone,
I am new to LQ and hoping to get some help. I have just installed Ubuntu 10.04 and it works fine. Next, I attempted to install Apache 2.2.16 server on the machine. I was able to get Apache installed but I cant't get it to start. The command I used to get it to start is "apachectl -k start" and got the response "command not found". Then I used the absolute path which is "/home/Administrator/Downloads/apache/bin/apachectl -k start" and got the response"httpd: could not reliably determine ther server's fully qualified domain name, using 127.0.1.1 for ServerName(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening to sockets available, shutting down". Please advise me on what to do. My eyes hurt from looking at the screen for so long trying different options and reading almost all the apache install instructions that exists. Just ready to have it up and running.

_007
 
Old 09-16-2010, 11:47 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Quote:
httpd: could not reliably determine ther server's fully qualified domain name, using 127.0.1.1 for ServerName
Harmless.
Quote:
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening to sockets available, shutting down
Did you run apachectl as root?
 
Old 09-16-2010, 11:50 AM   #3
_007
LQ Newbie
 
Registered: Sep 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Yes, I tried it as root already using the same command "apachectl -k start".
 
Old 09-16-2010, 12:16 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,526

Rep: Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503
Are you sure there is no other webserver running and listening on port 80?
Run:
Code:
netstat -tanpl|grep 80
to see if that's the case. Then stop the other webserver and run as root:
Code:
/home/Administrator/Downloads/apache/bin/apachectl -k start
 
Old 09-16-2010, 02:15 PM   #5
_007
LQ Newbie
 
Registered: Sep 2010
Posts: 4

Original Poster
Rep: Reputation: 0
I ran the netstat -tanpl|grep 80 and the results were:

tcp 1 0 192.168.1.4:57256 91.189.89.31:80 CLOSE_WAIT 1836/gvfsd-http

There are 6 lines like this. Not sure what it means, however, I ran as root and got the message:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

I didn't install any other servers.
 
Old 09-16-2010, 02:27 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,526

Rep: Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503
Quote:
There are 6 lines like this. Not sure what it means, however, I ran as root and got the message:
This is your browser visiting other webservers.

Quote:
Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
This is not an error as AlucardZero already pointed out. You can edit /home/Administrator/Downloads/apache/conf/httpd.conf, search for ServerName and add the name of your box.

Btw, if this is the only warning you see, then apache should have started. Try http://localhost and see if you get the default apache page.
If not, check /home/Administrator/Downloads/apache/logs/error_log to see if you find the reason
 
Old 09-16-2010, 02:38 PM   #7
_007
LQ Newbie
 
Registered: Sep 2010
Posts: 4

Original Poster
Rep: Reputation: 0
You are THE MAN! I didn't have to edit /home/Administrator/Downloads/apache/conf/httpd.conf. I typed in http://localhost and the "It works!" page came up. Thanks alot. By the way, for future reference for me, what do you mean when you say "add the name of my box"?
 
Old 09-16-2010, 02:46 PM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,526

Rep: Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503
Your box should have a name. Check /etc/hosts and you'll see among others something like:
Code:
192.168.1.4 host.domain.com host
You can use that "host.domain.com" for the ServerName directive in httpd.conf, so apache stops compaining.

Regards
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting and Stopping services leupi Ubuntu 6 01-20-2007 06:12 PM
Stopping X server from starting up Graham_UK Fedora 4 04-19-2005 03:39 PM
Stopping X from starting KennyK Linux - Software 4 06-03-2003 09:12 PM
stopping and starting services nero64 Linux - Newbie 3 11-13-2002 02:10 AM
Starting/stopping httpd bughunter Linux - Newbie 3 10-20-2001 11:02 AM


All times are GMT -5. The time now is 12:09 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