How to Install Apache Service on Windows – XAMPP
If you work a lot with PHP, sometimes you need to turn on and turn off the apache server manually, eg: everytime you turn on your computer, seems troublesome, right? It would be nice if the server automatically starts when the windows start, so here we’ll discuss how to install apache service on windows especially using XAMPP, if you prefer to use a command prompt, please refer to this tutorial: Install, Start, Stop, and Uninstall Apache Service on Windows Using Command Prompt
Install Apache Service on Windows
Before we start to install Apache Service on Windows,
First, it should be noted that only the FULL Version of XAMPP that can be used to install the apache service, not portable version nor full version packaged as an archive file, please refer to this article to determine the type of XAMPP package file.
Second, you have to run XAMPP Control Panel as Administrator, this can be achieved through start menu: go to Start menu > All Programs > XAMPP > XAMPP Control Panel, then right-click on it and choose Run As Administrator sub menu or go to XAMPP installation directory, then right click on xampp-control.exe file and click on Run As Administrator context menu.
From the windows start menu:
From the xampp-control.exe file:
1. Install apache service using XAMPP
To install Apache service using XAMPP, run XAMPP Control Panel as Administrator (as stated before), then click the apache service button located on the left side of Apache components, next, a message window “Click Yes to Install the Apache Service” will be prompted, click Yes to continue.
if successful, it will display a green checkmark.
2. Running Apache Service
So now, you have successfully installed apache service on your windows, but it won’t work because it is not running automatically, we have to run it manually, instead. To do so, back to your XAMPP Control Panel and click START button that corresponds to Apache component.
If everything went well, you’ll see the green color on the Apache component, and everything will be done. Now, every time you start your windows, apache service will start automatically.
3. Uninstall apache service using XAMPP
To remove/uninstall Apache Service that we have installed, simply uncheck the install service button, but first, you want to stop the Apache service, otherwise, it will trigger a pop-up error.
You can monitor any changes to your system while performing all of these tasks (install, run, and uninstall) by opening Services.msc file. To open this file, click on windows start menu then type services, next, click on the services.msc file in the search result box, or you can open this file through Windows Control Panel: Start » Control Panel » System and Security » Administrative Tools
On the figure above, Startup Type: Automatic means that the service will be started along with windows start.
If you want to use command prompt, you can read this article: http://webdevzoom.com/wp-content/uploads/2016/04/install_apache_service_on_windows_using_xampp.png