Starting And Stopping Apache Using Windows .bat Files

3rd June 2009 - 1 minute read time

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


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

Keshav Kalra (Mon, 04/23/2018 - 12:22)

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.

i am unable to start apache

kuldeep singh (Fri, 08/03/2018 - 18:09)

Add new comment

The content of this field is kept private and will not be shown publicly.