LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   httpd.pid does not create at the time of starting the httpd (https://www.linuxquestions.org/questions/linux-newbie-8/httpd-pid-does-not-create-at-the-time-of-starting-the-httpd-4175609685/)

hkabir269 07-12-2017 05:20 AM

httpd.pid does not create at the time of starting the httpd
 
Hi Dear,
If possible please suggest me solve the following problem.
httpd starting failure.
httpd.pid is not created at the time of starting the httpd

httpd.conf is ok

[root@station ~]# httpd -t
Syntax OK
[root@station ~]# /etc/init.d/httpd start
Starting httpd: [FAILED]
[root@station ~]# service httpd start
Starting httpd: [FAILED]
[root@station ~]#

Humayun Kabir

rtmistler 07-12-2017 08:02 AM

Regardless of that, can you tell if the httpd daemon is running? Perhaps the PID goes to a different file or location than you expect it to be put.

Did you use the "-k start" option to get it running? Or is it supposed to be started as a service?

If the daemon is not running, then perhaps you ought to use other flags like -e, -E or -X to debug a bit further.

scasey 07-12-2017 04:32 PM

Quote:

Originally Posted by hkabir269 (Post 5733913)
httpd.conf is ok

[root@station ~]# httpd -t
Syntax OK
[root@station ~]# /etc/init.d/httpd start
Starting httpd: [FAILED]
[root@station ~]# service httpd start
Starting httpd: [FAILED]
[root@station ~]#

Humayun Kabir

1) httpd -t only checks syntax, it does not validate that (for example) directory paths are valid. An invalid directory path will prevent httpd from starting.
2) (as has been mentioned) httpd won't start if it is already running. Do
Code:

ps -ef | grep httpd
to see if it's already running.
3) The reason it isn't started should be evident in the log files. They might (or might not, you didn't tell us what distro you're using) be
in
Code:

/var/log/httpd/
directory. The location is defined in your httpd.conf

!!! 07-12-2017 06:26 PM

Hi and welcome to LQ.
Did you spend some time web-researching the error (esp. if you want to learn Linux)?
Starting httpd: [FAILED]
Also, have a read of: http://www.linuxquestions.org/linux/...Ask_a_Question
Best wishes for success.


All times are GMT -5. The time now is 02:22 AM.