Windows Apache PHP Configuration Running

Configuring Windows Apache to Run PHP

How to configure Windows Apache to run PHP. Add the following to httpd.conf and restart.

Shou Arisaka
1 min read
Oct 22, 2025

How to configure Windows Apache to run PHP.

Add the following to httpd.conf and restart:


# load module
LoadModule php7_module c:/wamp64/bin/php/php7.0.10/php7apache2_4.dll

# .php file
<FilesMatch "\.php$">
 AddHandler php7-script .php
 AddType application/x-httpd-php .php
</FilesMatch>

# php.ini
PHPIniDir "c:/php"

Restart

cd C:\Apache24\bin
httpd -k restart

Test code

<?php

echo 'index.php' ;

Reference

https://www.adminweb.jp/apache/php/index1.html

Share this article

Shou Arisaka Oct 22, 2025

๐Ÿ”— Copy Links