码迷,mamicode.com
首页 > Web开发 > 详细

apache

时间:2015-10-12 18:55:09      阅读:237      评论:0      收藏:0      [点我收藏+]

标签:

配置apache虚拟机

http://blog.163.com/sylar_lin/blog/static/192332093201171211330364/

  在finder下按cmd+shift+g 输入private/etc

  1. 在httpd.conf中找到
    #Include /private/etc/apache2/extra/httpd-vhosts.conf
    ,去掉前面的“#”,保存并退出。

  2. 在httpd.conf中配置权限(注意前文自带需要去掉或者注释)

     <Directory "/Users/maiyan/sync">
         Options All
         AllowOverride All
         Order allow,deny
         Allow from all
     </Directory>
    
    
  3. 在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>
    
    
  4. 重启Apache   sudo /usr/sbin/apachectl restart

  5. 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

改文件读写

apache

标签:

原文地址:http://www.cnblogs.com/web-alibaba/p/4872425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!