LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2008, 05:49 PM   #1
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Rep: Reputation: 15
httpd listen 80


I am taking an online course in php-mysql and I had only httpd-2.2.4-2.fc6 installed so I built the lamp stack and started httpd, and then asked my teacher how to take it offline like wamp. He said to change allow to deny and port to 127.o.o.1 something and when I couldn't get a script to run I changed it back. I also changed ServerName to localhost. Anyway apache won't restart and I didn't back up the file. I'm getting error:
Just tried one last time as root
service httpd start
and got
Stopping httpd: [FAILED]
Starting httpd: Syntax error on line 332 of /etc/httpd/conf/httpd.conf:
Listen not allowed here.I copied listen 80 in the place it was but keep getting error.
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
Also before when it worked in place of local host I think it had a fake address www.somrthing blah . Do you know what that is supposed to read/default? thanks I really need help. I paid for the class and I'm missing it!
 
Old 04-10-2008, 05:55 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try Listen *:80

That would have been 127.0.0.1 not 127.o.o.1 btw
 
Old 04-10-2008, 10:39 PM   #3
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Original Poster
Rep: Reputation: 15
stop

I think my problem is in order for configuration changes to take place apache has to be stopped and restarted. I have tried a variety of stop commands as root and get:
[joe@localhost ~]$ su -c '/sbin/service httpd stop'
Password:
Stopping httpd: [FAILED]
Thanks for you help-I'll try it!
 
Old 04-11-2008, 12:10 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
It won't stop if it isn't running, that's why you get that message
 
Old 04-11-2008, 04:17 AM   #5
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Rep: Reputation: 15
check for status

before stop or start, better check for the service.
#service httpd status.
if it is running, u cant start. but should restart.
if it is stopped, u can start.
 
Old 04-11-2008, 09:01 AM   #6
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Original Poster
Rep: Reputation: 15
repeatmessage

As I explained above it won't start.
-bash-3.1# service httpd start
Starting httpd: Syntax error on line 332 of /etc/httpd/conf/httpd.conf:
Listen not allowed here
I have tried commenting out listen 80 but it didn't work.
As it stands now ServerName is www.example.com:80
I have tried changing to localhost to test. Apache won't start.
 
  


Reply



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 httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
service httpd status, results in httpd dead but subsys locked squadja Red Hat 2 09-11-2004 10:31 PM
how can i set apache httpd to listen to interface tun0 ? kublador Linux - Software 1 08-31-2004 10:14 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:26 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
Open Source Consulting | Domain Registration