标签:
http://blog.163.com/sylar_lin/blog/static/192332093201171211330364/
在finder下按cmd+shift+g 输入private/etc
在httpd.conf中找到
#Include /private/etc/apache2/extra/httpd-vhosts.conf
,去掉前面的“#”,保存并退出。
在httpd.conf中配置权限(注意前文自带需要去掉或者注释)
<Directory "/Users/maiyan/sync">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
在extra/httpd-vhosts.conf里面添加路由
<VirtualHost *:80>
DocumentRoot "/Users/maiyan/sync"
ServerName 127.0.0.1
ErrorLog "/private/var/log/apache2/sites-error_log"
CustomLog "/private/var/log/apache2/sites-access_log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Users/maiyan/sync/images001"
ServerName images001.5173cdn.com
ErrorLog "/private/var/log/apache2/sites-error_log"
CustomLog "/private/var/log/apache2/sites-access_log" common
</VirtualHost>
重启Apache sudo /usr/sbin/apachectl restart
host
127.0.0.1 dev.5173cdn.com
127.0.0.1 img01.5173cdn.com
127.0.0.1 images001.5173cdn.com
127.0.0.1 images.5173cdn.com
192.168.140.74 dev.5173cdn.com
192.168.140.74 img01.5173cdn.com
192.168.140.74 images001.5173cdn.com
192.168.140.74 images.5173cdn.com
如果还是有问题可以试试
chmod -R 777 ./wbb
chmod -R 777 wbb
改文件读写
标签:
原文地址:http://www.cnblogs.com/web-alibaba/p/4872425.html