Home > Backend Development > PHP8 > body text

Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

藏色散人
Release: 2023-02-17 12:48:01
forward
6902 people have browsed it

This article will introduce to you how to install apache2.4 and how to configure php8.0. The article is accompanied by pictures and detailed steps. Let's take a look at how to install and configure apache2.4 php8.0~

1. Download apache2.4

Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

2. Unzip and install

Unzip and put it in your favorite location
Open in administrator mode CMD switch directory to the newly decompressed Apache2.4/bin Command line input: http -k install Installation

[Related recommendations: PHP video tutorial]

Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

3. Configure the apache2.4 directory

Open the file apache2.4/conf/httpd.conf
Change the value of SRVROOT to your own apache2.4 Directory

Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

4. Start and stop

After the installation is completed, enter net start apache2.4 to start the apache service, net stop apache2.4 to stop the service
Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

You can also find this by double-clicking to start it

Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

4. Configure the website root directory

Open the file apache2.4/conf/ httpd.conf
Find DocumentRoot and change it to the root directory of your website
Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

5. Configure php8.0

at the end of apache2.4/conf/httpd.conf Join

#php8 support
LoadModule php_module “D:/server/software/php/php-8.1.13-Win32-vs16-x64/php8apache2_4.dll”
AddType application/x-httpd-php .php .html .htm
#configure the path to php.ini
PHPIniDir “D:/server/software/php/php-8.1.13-Win32-vs16-x64”

   Header set Access-Control-Allow-Origin: “*”
   Header set Access-Control-Allow-Methods: “GET,POST,PUT,DELETE,OPTIONS”
   Header set Access-Control-Allow-Headers: “Content-Type”

ErrorDocument 404 /index.html
Copy after login

The above is the detailed content of Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:learnku.com
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!