标签:alt index mod override port 并且 bin www. 地址
一、Mysql
参考:https://www.cnblogs.com/chengjiao/p/10112830.html
二、PHP
参考:https://www.cnblogs.com/chengjiao/p/10114098.html
三、Apache
下载地址:https://www.apachehaus.com/cgi-bin/download.plx 下载windows版本包\
① 解压到指定目录中,配置好环境变量,cmd httpd -k install 安装,打开 ApacheMonitor.exe 并且依次找到 httpd.conf [ apache24\conf\httpd.conf ] 、 httpd-vhosts.conf [ apache24\conf\extra\httpd-vhosts.conf ] 、hosts [ C:\Windows\System32\drivers\etc\hosts ]和 php.ini [ php\php.ini ] 四个文件
② 修改配置文件
httpd.conf [ apache24\conf\httpd.conf ]
1)将 Define SRVROOT 和 ServerRoot 更改成你的Apache安装路径
Define SRVROOT "E:/Nginx+php+Mysql/apache24" ServerRoot "E:/Nginx+php+Mysql/apache24"
2)修改 web发布目录,也称站点目录,更改成你的Apache的htdocs站点路径(你之后的项目将置放于此)
DocumentRoot "E:/Nginx+php+Mysql/apache24/htdocs" <Directory "E:/Nginx+php+Mysql/apache24/htdocs">
3) 修改默认web文件
<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>
4) 增加php解析能力,将php7apache2_4.dll 与 php 的文件目录路径分别 添加到 php7_module和PHPIniDir的路径
# php7 support LoadModule php7_module E:/Nginx+php+Mysql/php/php7apache2_4.dll AddType application/x-httpd-php .php .html .htm # configure the path to php.ini PHPIniDir "E:/Nginx+php+Mysql/php"
5) 添加虚拟域名
A 将改部分的注释# 去除
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
B ServerAdmin 进行修改
ServerAdmin 127.0.0.1:80
httpd-vhosts.conf [ apache24\conf\extra\httpd-vhosts.conf
<VirtualHost *:80> DocumentRoot E:/Nginx+php+Mysql/apache24/htdocs/myhcct ServerName www.myhcct.local DirectoryIndex hello.html index.html index.htm index.php <Directory "E:/Nginx+php+Mysql/apache24/htdocs/myhcct"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost>
a *80 本地默认所有IP 端口为80 eg:127.0.0.1:80
b DocumentRoot 项目所在路径
c ServerName 对外访地址
hosts [ C:\Windows\System32\drivers\etc\hosts ]
1)配合创建虚拟域名
127.0.0.1 www.myhcct.local
这里的对外访问路径需要和 httpd-vhosts.conf 文件中的 ServerName 保持一致
本配置环境 Win10(64)+ mysql + php +apache
PHP
Mysql
Apache
标签:alt index mod override port 并且 bin www. 地址
原文地址:https://www.cnblogs.com/chengjiao/p/10130720.html