首页 > 代码库 > 设置virtual host

设置virtual host

在http.conf确认已载入相关模块

LoadModule vhost_alias_module modules/mod_vhost_alias.so

在httpd-vhosts.conf或者在/home/http/conf/httpd.conf 添加以下配置。

<VirtualHost *:80>

    DocumentRoot "f:/git/minyun"

    ServerName minyun

<Directory "f:/git/minyun">

    Options Indexes FollowSymLinks Includes ExecCGI

    AllowOverride All

    Require all granted

    AllowOverride All

</Directory>

</VirtualHost>

确认Include "conf/extra/httpd-vhosts.conf"前没有#

在windows下,还要改下C:\windows\system32\drivers\etc下hosts文件

 

127.0.0.1 minyun