Run Apache on Windows without any extra software
I'm the kind of guy who doesn't like to install extra software, and would rather spend the time to do something the most basic way instead of doing something the easiest way.
That's why I installed Apache on my Windows computer (windows 10) without using any extra software to set it up. I'm currently running Apache with MySQL and PHP 7.
You can download Apache for windows from a number of different websites, including Apache Haus. You can view a full list on the Apache Website.
Once you select the right version, copy the Apache24 folder out of the zip file and into the
C: directory on your computer.
Setting up your server configuration
conf folder, you should see a file called
httpd.conf. Open it with your favorite text editor (Notepad should work fine), and add a line like this (you can choose any convenient file path, I chose the documents folder in this example). This will be a file where you can edit your server settings without having to navigate to the Apache24 folder.
1Include "C:\Users\(your username)\Documents\server.conf"
Once you create the new file (wherever you set the path to), open it and add this code to set up your Apache server.
1#Set up your server to listen to port 80 (the default port on your machine)
4#Set up the path to your server root folder
5DocumentRoot "C:\Users\(your username)\Documents\(website root folder)"
7#Allow access to your folder
8<Directory "C:\Users\(your username)\Documents\(website root folder)">
9 Require all granted
12#Set the server name for your site
15#Set up the default file for each directory
16#You can change this based on which file types you have
17DirectoryIndex index.php index.html index.shtml
19#If you are running PHP, you'll need to set this up to direct to the folder where you have PHP installed
20Action application/x-httpd-php "C:/PHP7/php-cgi.exe"
21#Set the path to the php.ini file
Run Apache on startup
To start Apache, navigate to the Apache folder you installed, open the bin folder, and run the
httpd.exe file. Your server should now be accessible from
To make your server automatically start when you turn on your computer, open task manager, click the services tab, right click on the
Apache24 task, and click "go to services".
Now right click on the Apache2.4 service, click properties, and change the startup type to Automatic.