LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache is not starting (http://www.linuxquestions.org/questions/linux-software-2/apache-is-not-starting-780627/)

dcinadr 01-07-2010 02:32 PM

Apache is not starting
 
When I try to start Apache2 (apachectl start) the command prompt returns right away. But when I check the processes (ps ax) I can't find httpd. And when I try to hit the server from a browser I get "the page cannot be displayed" error. How can I figure out whats wrong and fix it?

Elv13 01-07-2010 02:34 PM

Depending on your distribution, the process can be called apache too. And try
sudo /etc/init.d/apache start
or
sudo /etc/init.d/httpd start
or
service apache start

depending on your unspecified distribution.

EricTRA 01-07-2010 02:37 PM

Hello and Welcome to LinuxQuestions,

Have you checked your log files for any errors? If there are, please post them here too.

Kind regards,

Eric

dcinadr 01-07-2010 02:38 PM

Thanks. But none of that works.

Elv13 01-07-2010 02:40 PM

You did not specified your distribution, it's kind of hard to help you.

dcinadr 01-07-2010 02:40 PM

I am running SUSE. Is that what you mean?

dcinadr 01-07-2010 02:41 PM

where is the log file stored and what is the name of it?

EricTRA 01-07-2010 02:42 PM

Hi,

Also please post what distro you are using as indicated by Elv13, so we have an idea of what commands to indicate to you.

Kind regards,

Eric

dcinadr 01-07-2010 02:51 PM

SUSE

EricTRA 01-07-2010 02:55 PM

Hello,

Now that that's in the clear, I don't have any experience with Suse and/or OpenSuse, but I imagine there are logs in there also. Maybe even in the same location as most of the distros, nl. /var/log.

Can you have a look in there and check if there's a directory called apache or apache2, or httpd? Maybe there's even a httpd.log in the /var/log/ directory. Can you check what, if any, errors it contains? Also check /var/log/messages and /var/log/syslog for errors in regard to the httpd/apache process. Post any relevant information here please.

Kind regards,

Eric

dcinadr 01-07-2010 02:59 PM

Thank you for the help. I was able to find the error_log file in /var/log/apache2 directory. And there was an error that indicated it was not able to create the httpd.pid file in /usr/local/apache2/logs directory because that directory didn't exist. So created the directory and everything seems to work fine now.

Thanks again for the help.

EricTRA 01-07-2010 03:54 PM

Hi,

You're welcome. Sorry for the late reply but my internet has the hick-up and fails on me like every 5 minutes. Glad you solved it, have fun using Linux.

If you consider the problem solved then please mark this thread as such using the Thread Tools.

Kind regards,

Eric


All times are GMT -5. The time now is 11:29 PM.