1. First Apache PHP MySQL installation package
2. Create a new folder on the D-Disk for myphp2017
2. Parsing Apache installation package in myphp2017
3. Open Apache below the conf below the httpd.conf, for steps to modify
① change the path of ServerRoot to "D:\myphp2017\Apache"
② change the path of Dodocumentroot to "D:\myphp2017\Apache\htdocs"
③ the path to Dodocumentroot directory below is also changed to "D:\myphp2017\Apache\htdocs"
④ change Scriptalias to scriptalias/cgi-bin/"D:\myphp2017\Apache\cgi-bin"
⑤ change to "D:\myphp2017\Apache\cgi-bin" in Directory
After changing to
<directory "D:\myphp2017\Apache\cgi-bin" >
AllowOverride None
Options None
Require all granted
</Directory>
Apache is ready to deploy.
4. Parse the PHP installation package into myphp2017
5. Under Apache conf below the httpd.conf, proceed with the steps to modify
① on the last side of httpd.conf plus PHP configuration
Phpinidir "D:\myphp2017\php-7.0.23"
LoadModule php7_module "D:\myphp2017\php-7.0.23\php7apache2_4.dll"
AddType application/x-httpd-php. php
② a copy of the php.ini-development or php.ini-production under D:\myphp2017\php-7.0.23
Its name is php.ini
③php.ini extension_dir Modify path to Extension_dir = "D:\myphp2017\php-7.0.23\ext"
Information configuration in php.ini
ENABLE_DL = On
Cgi.force_redirect = 0
Cgi.fix_pathinfo=1
Fastcgi.impersonate = 1
Cgi.rfc2616_headers = 1
PHP configuration is ready.
6. Install Mysql-5.5.57-winx64.mis, to myphp2017
7. Configure the Apache virtual directory
① found the hosts under C:\WINDOWS\SYSTEM32\DRIVERS\ETC.
② in the hosts and 127.0.0.1 www.blog.com (local name address)
③ in httpd.conf under Conf under Apache.
At the bottom of the virtual hosts strip.
④ found the httpd-vhosts.conf under D:\myphp2017\Apache\conf\extra.
⑤ all the notes in it, add
<virtualhost *:80>
#邮箱名
ServerAdmin[email protected]
DocumentRoot "D:\myphp2017\blog\php"
ServerName www.blog.com
DirectoryIndex login.php
Errorlog "Logs/blog.com-error.log"
Customlog "Logs/blog.com-access.log" common
<directory "D:\myphp2017\blog\php" >
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Configuration of apache.php and MySQL