时间:2023-07-15 01:18:01 | 来源:网站运营
时间:2023-07-15 01:18:01 来源:网站运营
1 Apache HTTP Sever的安装和多个虚拟主机的创建:链接:https://pan.baidu.com/s/1No9UIRYJF3psrpUKu9Ffig 提取码:rfkr
注意Define SRVROOT "D:/Program_Files/httpd-2.4.46-win64-VS16/Apache24"ServerName localhost:80
# 1-使用cmd终端,用管理员的方式打开终端# 2-找到服务器的bin目录# 3- 输入 如下指令httpd.exe -k install# 双击如下文件,启动服务器ApacheMonitor.exe
#virtual hosts
将下面一行#Include conf/extra/httpd-vhosts.conf
的# 注释删掉,使其生效,保存退出。<VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/usr/local/apache/docs/dummy-host.example.com" ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog "logs/dummy-host.example.com-error_log" CustomLog "logs/dummy-host.example.com-access_log" common</VirtualHost>
# 域名直接访问默认站点 htdocs<VirtualHost *:80> ServerAdmin 1390128154@qq.com DocumentRoot "${SRVROOT}/htdocs" ServerName www.huaguoshan66.tech ErrorLog "logs/www.huaguoshan.tech-error.log" CustomLog "logs/www.huaguoshan.tech-access.log" common</VirtualHost># 域名直接访问默认站点 htdocs下的子站点 www.wukong.com<VirtualHost *:80> ServerAdmin 1390128154@qq.com DocumentRoot "${SRVROOT}/htdocs/www.wukong.com" ServerName wukong66.com ErrorLog "logs/www.wukong.com-error.log" CustomLog "logs/www.wukong.com-access.log" common</VirtualHost># 域名直接访问默认站点 htdocs外的其他站点 www.zhubajie.com<VirtualHost *:80> ServerAdmin 1390128154@qq.com DocumentRoot "${SRVROOT}/www.zhubajie.com" ServerName zhubajie66.com ErrorLog "logs/www.zhubajie.com-error.log" CustomLog "logs/www.zhubajie.com-access.log" common <Directory "${SRVROOT}/www.zhubajie.com"> Require local </Directory></VirtualHost>
127.0.0.1 www.huaguoshan66.tech127.0.0.1 wukong66.com127.0.0.1 zhubajie66.com
关键词:虚拟,主机,创建,安装