LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-21-2013, 04:43 AM   #1
swanny99
LQ Newbie
 
Registered: May 2012
Distribution: CentOS
Posts: 26

Rep: Reputation: Disabled
httpd restart failed Centos


Can not start httpd. Centos

There seems to be a problem with the httpd.pid file.

I deleted the file, I created a new httpd.pid file (also tried chmod to 777)

In httpd.conf, I changed the path to the pid file from run/httpd.http to the full path of where the original file was /var/run/httpd/httpd.pid

In /etc/sysconfig/httpd changed #PIDFILE=/var/... to :- removed #

Server had been working. New server (1 week) with one site on it. I tried to add a new site but could not restart httpd.

Had various errors, currently, for "apachectl restart" :-
httpd not running, trying to restart

Then for "/sbin/service httpd restart":-
Stopping httpd: [FAILED]
Starting httpd:[FAILED]
 
Old 01-21-2013, 05:56 AM   #2
bijo505
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: Fedora & Ubuntu
Posts: 77

Rep: Reputation: 18
Hi Swanny99,
Try to check the configuration using
Code:
apachectl configtest
http://httpd.apache.org/docs/2.2/pro...apachectl.html
http://www.tech-recipes.com/rx/112/t...ile-httpdconf/
 
Old 01-21-2013, 06:06 AM   #3
swanny99
LQ Newbie
 
Registered: May 2012
Distribution: CentOS
Posts: 26

Original Poster
Rep: Reputation: Disabled
Hi bijo505,

Syntax OK
 
Old 01-21-2013, 07:04 AM   #4
bijo505
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: Fedora & Ubuntu
Posts: 77

Rep: Reputation: 18
Hi Swanny99,

Did you remove the pid file, while apache is running, if yes try to kill all apache/httpd process using ps and then try to restart apache and also check the apache error log. That will help you to overcome this.
Code:
ps -auxw | egrep -i 'apache|http' 
kill -9 <pid>
 
1 members found this post helpful.
Old 01-21-2013, 07:45 AM   #5
swanny99
LQ Newbie
 
Registered: May 2012
Distribution: CentOS
Posts: 26

Original Poster
Rep: Reputation: Disabled
Problem resolved. Permissions issue when creating the transfer-log for the new site.

Thanks for trying to help bijo505.
 
  


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
Can not restart httpd”File size limit exceeded(core dumped) $HTTPD -DSSL” sreejithedl Linux - Server 2 10-12-2009 11:24 AM
cronjob to restart httpd if httpd is dead heropage Linux - Software 1 10-31-2007 01:22 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
httpd restart FAILED error: Could not determine the server's fqdn mcbaind Linux - Networking 8 10-06-2006 08:21 AM
Failed Httpd restart namboi Linux - Newbie 5 05-07-2005 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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