10

I have installed httpd-2.2.29 using commands:

./configure --prefix=/home/user/httpd
make
make install

I configured httpd.conf and tried to start with apache: apachectl start. But got following error:

(13)Permission denied: Error retrieving pid file run/httpd.pid Remove it before continuing if it is corrupted.

I tried to find file httpd.pid, but where is no such file.

Could someone help me resolve such issue?

Pradeep
  • 9,667
  • 13
  • 27
  • 34
khris
  • 4,809
  • 21
  • 64
  • 94

4 Answers4

15

Did you try and start apache as a non privileged user? Permission denied suggests that you did. Try this instead:

$ sudo apachectl start
Eilidh Fridlington
  • 480
  • 1
  • 3
  • 9
3

I use:

$ sudo service httpd start

In the place of start you can put stop, restart, and etc.

CodeBroJohn
  • 1,085
  • 8
  • 17
2

In my case, service was in running mode, I used restart command

$ sudo apachectl restart

javed
  • 406
  • 3
  • 10
0

In my case, I fixed it with the following:

sudo killall httpd

Verified that there were no other httpd-related processes running

ps -elf | grep httpd

Started the httpd service again

sudo service httpd start

Confirmed that the httpd service was running again

sudo service httpd status
Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107