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~
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]
Open the file apache2.4/conf/httpd.conf
Change the value of SRVROOT to your own apache2.4 Directory
After the installation is completed, enter net start apache2.4 to start the apache service, net stop apache2.4 to stop the service
You can also find this by double-clicking to start it
Open the file apache2.4/conf/ httpd.conf
Find DocumentRoot and change it to the root directory of your website
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!