search
HomeBackend DevelopmentPHP8Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0

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

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!

Statement
This article is reproduced at:learnku. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function