mac apache下面配置vhost

来源:互联网 发布:java.lang.integer 编辑:程序博客网 时间:2024/05/16 10:26

MAC下面设置vhost

在httpd.conf#Include /private/etc/apache2/extra/httpd-vhosts.conf(去掉注释)Include /private/etc/apache2/extra/httpd-vhosts.conf**在Listen 80后换行添加Listen 8081**httpd_vhosts.conf里面添加<VirtualHost *:8081>    DocumentRoot "/Users/hh/wwwroot/blog/public"    ServerName www.blog.com    ErrorLog "/Users/hh/wwwroot/log/blog_error.log"    CustomLog "/Users/hh/wwwroot/log/blog_access_error.log" common</VirtualHost><Directory />       Options Indexes FollowSymLinks        AllowOverride All        Order allow,deny        Allow from all</Directory>然后在vhost中添加127.0.0.1   localhost www.blog.com
0 0
原创粉丝点击