Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win98 - Apache 2 - service won't stop or restart

Status
Not open for further replies.

sonnysavage

Programmer
May 29, 2002
130
US
I've installed Apache as a service on my Win98 machine.
I used this command to do so:
Code:
apache -n apache2 -k install -f "C:\Program Files\Apache Group\Apache2\conf\httpd.conf" -d "C:\Program Files\Apache Group\Apache2\."

I use this command to start the service:
Code:
Apache -n apache2 -k start
(I've removed the registry entry which loads it at boot time)

What happens when I give a restart command:
Code:
C:\Program Files\Apache Group\Apache2\bin>Apache -n apache2 -k restart

C:\Program Files\Apache Group\Apache2\bin>
(hint: nothing happens, not even an error message)

What happens when I give the shutdown command:
Code:
C:\Program Files\Apache Group\Apache2\bin>Apache -n apache2 -k shutdown
The Apache2 service is stopping.
Failed to stop the Apache2 service.

C:\Program Files\Apache Group\Apache2\bin>

If I try to use
Code:
ctrl-alt-del
it just seems to restart. When I re-boot Windows, I have to click "End Task" to close it.

Has anyone else seen/resolved this issue? Thanks!
 
That works when I run it in a console, but not when I am running it as a service.

Anyone else?
 
Actually, I have Apache 1.3.2X installed as a service just fine. You can use the same commands above with it (modifying the paths of course), and it will run as a service.

To remove the registry entry that loads it at boot time, run
Code:
regedit
from Start -> Run..., navigate here:
Code:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices\
and delete the Apache entry. The registry entries for service definitions are located here:
Code:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\

I have made shortcuts for the
Code:
Start
,
Code:
Restart
, and
Code:
Shutdown
commands that I listed in my first message. I use the console window when I'm testing my configuration, and then run the service once the console testing is complete. I like not having an extra button on my taskbar. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top