https://segmentfault.com/a/1190000003409708
超好用的教程,你值得拥有。
按着这个教程一步一步来就可以了,亲测有效。
这里再说一下我遇到的问题及解决
1.httpd: Syntax error on line 188 of D:/Program Files/wamp/httpd-2.4.39-win64-VC15/Apache24/conf/httpd.conf: Can't locate API module structure `php5_module' in file D:/Program Files/wamp/php-7.3.5-Win32-VC15-x64/php7apache2_4.dll: No error
因为我下载的是PHP7,原文是PHP5,所以不能完全照搬原文的httpd.conf文件配置,需要有一些小的改动,要改成PHP7_module
# 如下为PHP环境添加模块
LoadModule php7_module "D:/Program Files/wamp/php-7.3.5-Win32-VC15-x64/php7apache2_4.dll"
PHPIniDir "D:/Program Files/wamp/php-7.3.5-Win32-VC15-x64/php.ini"
2.AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::6de7:4216:a182:dd69. Set the 'ServerName' directive globally to suppress this message
打开httpd.conf文件,修改如下:
#ServerName www.example.com:80
ServerName localhost:80