apahce integration with php

巴扎黑
Release: 2016-11-23 15:08:14
Original
1122 people have browsed it

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:


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 to:

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template