Starting And Stopping Apache Using Windows .bat Files

Following on from the post about starting and stopping MySQL using .bat files I decided to add commands to these files that also controlled Apache in the same way. This turned out to be a lot easier than trying to start and stop MySQL as the command line commands for httpd executable worked very well in .bat files.

So, to start Apache use the following line.

"C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd" -k start

And to stop the server use the following line.

"C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd" -k stop

Comments

Need help.. I want bat file to start catalina.bat file & once it started it will create log also. Would you please help. C:\apache-tomcat-7.0.79\bin Path catalina.bat this is the bat file
Permalink
Catalina is tomcat, not Apache Web server, which is what this article was on about. Also, I haven't used Windows in about 6 years so I'm not familiar with the system at all these days. Sorry.
Name
Philip Norton
Permalink

i am unable to start apache

Permalink

Have you tried ointment?

Name
Philip Norton
Permalink

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
6 + 13 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.