In the past, Apache PHP and Perl support was installed in Linux. Because Linux has installed everything by default, you can simply change the configuration file. It took a lot of time to get Apache PHP support in windows. To sum up, it may be useful in the future.
1. First download the relevant software
- Apache http://www.apache.org
- PHP http://www.php.net
2. Configure Apache
Generally, there are two ways to run php. The first method is module mode. Open httpd. conf:
- Addtype application/X-httpd-PHP. php
- Loadmodule php4_module "D:/PHP/php4apache2. dll"
The second method is CGI:
- Addtype application/X-httpd-PHP. php
- ScriptAlias/PHP/"C:/PHP /"
- Action application/X-httpd-PHP "/PHP/php.exe"
These are the main points. Add other options such as directoryindex, defaultlanguage, and addcharset as needed.
3. Configure PHP
Copy PHP. ini-recommended to the Windows directory. This is basically OK.