LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-21-2007, 01:07 AM   #1
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
can't start httpd in rhel5


I just installed RHEL 5 on a new server, and I can't start up the pre-installed apache 2.2

sudo /etc/init.d/httpd start
sudo /etc/service httpd start

both return [FAILED] and nothing else. I checked out /var/log/httpd and the folder was empty. /var/log/messages shows nothing, neither does dmesg or any other logs I can find. i ran the config test (through apachectl and through /usr/sbin/httpd) and both said "Syntax ok."

interestingly enough, if I do

sudo /usr/sbin/httpd -k start

it works just fine. trying to do that as the apache user gives me an error about not having permission to bind to port 80, but since it's < 1024 I believe that's normal behavior.

I tried messing with the /etc/init.d/httpd startup script, I commented out the whole start section and replaced it with just $httpd but that didn't help one bit. I've triple checked that $httpd and $apachectl are correct.


I should mention that I severely locked down this server. I used to /etc/hosts.deny file to prevent access to anything. /etc/hosts.allow allows just sshd and httpd. I went through all the services starting up and disabled a great many of them. I think I did a pretty thorough job of securing it, but I've done this before and never seen this problem before.

any ideas are welcome, thanks.
 
Old 12-21-2007, 09:32 AM   #2
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Original Poster
Rep: Reputation: 33
I think I found the solution, for those who come later. Apparently selinux was interfering. I ran

sudo system-config-securitylevel

and even though it said it was disabled, I went to customize, and specifically allowed incoming connections for www and ssh. I said OK and tried running the startup script again, and this time it worked just fine. Interestingly enough, ssh connections were working before - I never had any trouble with them.
 
Old 01-11-2008, 04:47 AM   #3
Coyote34
LQ Newbie
 
Registered: Oct 2007
Posts: 13

Rep: Reputation: 0
Did you try copying the httpd.conf.bak to httpd.conf?

I have had a problem like that. My httpd didnīt start and no error message.
I have copied http.conf.bak to httpd.conf and it worked. The grafic config interface messed my http.conf. I have red something in the documentation.

I hope have been useful...

Last edited by Coyote34; 01-11-2008 at 04:49 AM.
 
  


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
system-config-httpd in RHEL5 - cant start apache :( BigG Red Hat 13 01-31-2008 06:31 PM
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
need help with httpd start MaX-PaYnE Linux - Newbie 6 11-29-2006 11:48 PM
cant start httpd mag_um Linux - Software 2 05-27-2005 08:20 AM
httpd will not start :: buddy Linux - General 9 12-31-2002 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:55 AM.

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