PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Nov 16, 2018 8:29 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Mar 02, 2009 8:39 am 
Offline
Forum Newbie

Joined: Fri Jul 18, 2008 10:23 am
Posts: 13
Hi,

I have just installed apache on Centos and the server started fine, 'service httpd status' was ok. the browser work.

i tried to restart 'service httpd restart' after changing the config file and stopping "FAILED" and starting "OK". when i look for httpd processes 'ps -aux | grep httpd' nothing appears, and localhost in the browser shows "failed to connect". 'service httpd status' returns "httpd dead but subsys locked".

In the error_log it says:
[Mon Mar 02 13:19:33 2009] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Mon Mar 02 13:19:33 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 02 13:19:33 2009] [notice] Digest: generating secret for digest authentication ...
[Mon Mar 02 13:19:33 2009] [notice] Digest: done
[Mon Mar 02 13:19:34 2009] [warn] pid file /etc/httpd/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Mar 02 13:19:34 2009] [error] (13)Permission denied: could not create /etc/httpd/logs/httpd.pid
[Mon Mar 02 13:19:34 2009] [error] httpd: could not log pid to file /etc/httpd/logs/httpd.pid

i have been searching for answers and some people say delete the /var/run/httpd.pid file. i did that but still it wont work. i have also tried deleting the /var/locl/subsys/httpd file and this does not work. strangley the only way i can get apache to work is if i type 'httpd -X' but i am not sure what this doing.

i cant find any other advise on the net. any ideas?


Top
 Profile  
 
PostPosted: Mon Mar 02, 2009 10:08 am 
Offline
Forum Newbie

Joined: Fri Jul 18, 2008 10:23 am
Posts: 13
i have added the following links:

ln -s /etc/init.d/apachectl /etc/rc3.d/S90apache

ln -s /etc/init.d/apachectl /etc/rc2.d/K90apache
ln -s /etc/init.d/apachectl /etc/rc1.d/K90apache
ln -s /etc/init.d/apachectl /etc/rc0.d/K90apache

now as long as i delete the /etc/httpd/logs/http.pid file before each start it works.

if it try and stop it i get the following error:
(20014)Internal error: Error retrieving pid file logs/httpd.pid
Remove it before continuing if it is corrupted.

if i try and restart i get:
(20014)Internal error: Error retrieving pid file logs/httpd.pid
Remove it before continuing if it is corrupted.

i then have to delete the httpd.pid file before i start and it works. any ideas what the problem is?

thanks


Top
 Profile  
 
PostPosted: Thu Sep 08, 2011 9:22 pm 
Offline
Forum Newbie

Joined: Thu Sep 08, 2011 9:11 pm
Posts: 2
OK I had this same problem it has to do with permissions the Apache server is registered under a new install to root. so in terminal you have to change to su to start the server. I also chown the etc/httpd folder


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group