Apache won't stop

Posted on 2006-04-17
Medium Priority
Last Modified: 2012-05-05
Hi I recently installed Apache 1.3.34. The installation worked fine. When I type
hhtp://localhost it also shows me the default web page. But when i try to shutdown Apache using the folowing command
Apache -k shutdown it gives me the following message
Cannot read apache PID file c:/program files/apache group/apache/logs/httpd.pid

Would anyone know why it is giving this message and how can I shutdown Apache.

I also tried using ctrl C but if I go to the http://localhost, it still goes to the defualt page

Question by:royalcyber
LVL 15

Accepted Solution

m1tk4 earned 672 total points
ID: 16472246
Does it shut down correctly when you stop the Apache service in Control Panel / Admin Tools / Services?

Author Comment

ID: 16472298
yes it stopped the server now. but why it is not stopping it when I use the command
Apache -k shutdown

LVL 15

Expert Comment

ID: 16472339
try starting it again and see if this .pid file is created where it is looking for it (i.e. /program files/apache... etc.)
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 16474158
it gives the same message

it tries to read the file in the following directory

c:/program files/apache group/apache/logs/httpd.pid

LVL 15

Expert Comment

ID: 16474527
Is the file there?
LVL 11

Assisted Solution

WelkinMaze earned 664 total points
ID: 16476390
Maybe because the apache is run as service the access to the httpd.pid file is blocked and it cannot be stopped this way. As far as I know this file holds the process id of the parent process.
LVL 27

Assisted Solution

Nopius earned 664 total points
ID: 16485068
Try to edit httpd.conf file and to setup another directory for apache pid file (without spaces):
PidFile c:/httpd.pid

Also you may try to stop apache in CLI by using 'net stop':
net stop apache


Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question