Home>Article>Backend Development> How to configure php in apache

How to configure php in apache

王林
王林 Original
2019-10-09 11:58:00 7854browse

How to configure php in apache

1. Configure apache to call the "php language module (engine)" to execute the php code. Apache's main configuration file httpd.conf is required. Its location is: apache installation directory/conf/httpd.conf

How to configure php in apache

#2. Find the location of "Loading Module": and in At the last position of this series of LoadModules, add this line: "LoadModule actions_module modules/mod_actions.so", the module file in the php5 language package. Among them, the php5 language module name is a fixed name, which is: php5_module, php5 language package, In fact, it is the folder of the php language package

How to configure php in apache

3. At the end of the apache configuration file, write: LoadModul php5_module "H:/amp/php/php5apache2_2.dll"

How to configure php in apache

4. Start a new line to set the file with php suffix, which will be executed by this php language module. "AddType application/x-httpd-php .php"

How to configure php in apache

5. Restart Apache

Recommended tutorial:PHP video tutorial

The above is the detailed content of How to configure php in apache. For more information, please follow other related articles on the PHP Chinese website!

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