美文网首页工作生活
Apache虚拟主机配置

Apache虚拟主机配置

作者: 小透明进击战 | 来源:发表于2019-07-02 19:02 被阅读0次

*虚拟主机配置
已经要先将http.conf文件中的虚拟主机的注释去掉。

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

然后在httpd-Vhosts.conf文件中添加配置

#first virtualHost
<VirtualHost *:80>
    #配置根目录
    DocumentRoot "E:/www"
    #允许这个目录被访问
    <Directory "E:/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
    #配置域名
    ServerName zhuzhu.abc
    #日志
    ErrorLog "logs/zhuzhu.abc-error.log"
    CustomLog "logs/zhuzhu.abc-access.log" common
</VirtualHost>

相关文章

网友评论

    本文标题:Apache虚拟主机配置

    本文链接:https://www.haomeiwen.com/subject/suwthctx.html