mac xampp 多域名多站点

来源:互联网 发布:网络舆情应对 编辑:程序博客网 时间:2024/06/08 09:20

修改httpd.conf文件,目录是/Applications/XAMPP/xamppfiles/etc/httpd.conf,在终端里输入命令如下

打开httpd.conf文件后,搜索 “httpd-vhosts.conf”,去掉前面的 # 注释符,确保引入了 vhosts 虚拟主机配置文件。

再在httpd.conf的最后面添加一段以下代码

<Directory "/Users/yaowan/liyan/yaowan/code/dfh3">

    Options Indexes FollowSymLinks ExecCGI Includes

    AllowOverride All

    Require all granted

</Directory>

说明:
“Options All”是允许目录浏览,有安全性风险,适合用于个人调试程序,需注意当站点根目录含index.html页面时,会默认打开网页,而不是目录列表,因此此模式需删除index.html.
“Options Indexes FollowSymLinks ExecCGI Includes”是不允许目录浏览,适合正式站点

编辑 httpd-vhosts.conf文件


原创粉丝点击