zoukankan      html  css  js  c++  java
  • apache配置虚拟主机

    步骤如下:

    1.在配置文件httpd.conf中启用httpd-vhosts.conf

    找到# Virtual hosts将Include conf/extra/httpd-vhosts.conf前的#去掉。

    2.假设虚拟主机在f:/myblog(事先要存在该站点,可以是虚拟目录,可以是apache的站点文件)

    3.设置httpd-vhosts.conf文件

    #配置虚拟主机
    <VirtualHost 127.0.0.1:80>
        DocumentRoot "f:/myblog"
        #配置欢迎页
        DirectoryIndex index.php index.html index.htm
        <Directory />
        Options FollowSymLinks
        #访问权限设置
        AllowOverride None
        Order allow,deny
        Allow from all
        </Directory>
    </VirtualHost>

    4.修改hosts文件。添加ip和主机映射关系

    C:WindowsSystem32driversetchosts.

    添加本机ip      域名

  • 相关阅读:
    python virtualenv
    ICMP
    正则表达式
    tcpdump命令
    vim命令
    IP网际协议
    链路层
    python模块学习 logging
    Angular2+如何去除url中的#
    angular5懒加载之模块划分
  • 原文地址:https://www.cnblogs.com/dreamflycc/p/VirtualHost.html
Copyright © 2011-2022 走看看