Saturday, August 16, 2014

Run Apache Server In Windows Without Creating Service

But the first question is why will you want to do that. When you install Apache server in Windows, it will create Windows services automatically. And then whenever you boot your machine, these Apache services will start running by default. You will have to disable them on startup explicitly. And if you don't do that, they will make Windows startup somewhat slower even when you don't want to use Apache sever. These services will also consume RAM unnecessarily. That's a bit annoying especially if you have lots of other applications to work on in your local machine. So other alternative approach is to run Apache server directly as a console application. Just download the Apache binary zipped file and unzip it in your preferred location. Now from command line go to the bin folder inside the unzipped folder. Then type the below command:
httpd.exe
Apache server will keep running until you press Ctrl+C.
So start it only when you need it and save some unnecessary memory consumption. The drawback is that you won't have the option to clean-up gracefully during shutdown. But it should be fine in most cases when you are using it for developing and testing in your local machine.

No comments:

Post a Comment