(mac)xampp+php 虚拟域名设置

2016-09-30  本文已影响43人  一言不合拔萝卜

黑妞HAHA博文

1、编辑hosts文件,目录是/etc/hosts,
2、修改httpd.conf文件,目录是/Applications/XAMPP/xamppfiles/etc/httpd.conf,在终端里输入命令如下
打开httpd.conf文件后,按ctrl+W搜索 “httpd-vhosts.conf”,去掉前面的 # 注释符,确保引入了 vhosts 虚拟主机配置文件。
3、打开文件httpd-vhosts.conf文件,目录是/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf,在终端里输入命令如下:

4、将项目的权限都改成读写,记得点选应用到所有项目

第三步
<Directory "/Users/heiniuhaha/Sites/project">#Options Indexes FollowSymLinks ExecCGI Includes #don't permission see list Options AllAllowOverride AllOrder allow,denyAllow from all</Directory>
这些代码,并不清楚作用,反正不加,也依然有效- -,可以先不加.

上一篇下一篇

猜你喜欢

热点阅读