This site uses third-party cookies, learn more or accept

Run Apache on Windows without any extra software

Run Apache from your Windows machine, without using any extra software.
Written by Maxwell Pelic,

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.

Download Apache

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

In the 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.


Include "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.


#Set up your server to listen to port 80 (the default port on your machine) 
Listen *:80

#Set up the path to your server root folder
DocumentRoot "C:\Users\(your username)\Documents\(website root folder)"

#Allow access to your folder
<Directory "C:\Users\(your username)\Documents\(website root folder)">
	Require all granted
</Directory>

#Set the server name for your site
ServerName localhost

#Set up the default file for each directory
#You can change this based on which file types you have
DirectoryIndex index.php index.html index.shtml

#If you are running PHP, you'll need to set this up to direct to the folder where you have PHP installed
Action application/x-httpd-php "C:/PHP7/php-cgi.exe"
#Set the path to the php.ini file
PHPIniDir /PHP7



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 http://localhost.

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.

Previous Article: Create a PHP Blog - no Database Needed!

Next Article: Fallback resource overview