Home >Backend Development >PHP Tutorial >apahce integration with php
Integrate apache and php
1. Modify the apache configuration file httpd.conf
1) Find the place where there are many LoadModules in the httpd.conf file, and add the following statement at the end:
LoadModule php5_module E:/soft_work/PHP /php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir "E:/soft_work/PHP"
2) Modify DirectoryIndex and add index.php
3) Create a new one in htdocs in the apache directory A directory myphp, and then create an index.php file in the directory with the following content:
phpinfo(); ?>
3) Restart apache, and then enter http://localhost/myphp in the browser , if the result can be obtained, it means that the integration of apache and php is successful.
Additional: If you want to change the directory of the site, modify httpd.conf
Set the site root directory and change the original
DocumentRoot "E:/soft_work/Apache Http Server/htdocs" Change to:
DocumentRoot "D:/site"
Change