新随笔  :: 联系 :: 订阅 订阅  :: 管理

apache虚拟主机配置文件

Posted on 2012-07-22 22:09  张贺  阅读(519)  评论(0编辑  收藏  举报

修改http.conf文件 修改用户名与用户组

<Directory />
Options Indexes FollowSymLinks
AllowOverride none
# Require all denied
# Deny from all
</Directory>



<VirtualHost *:80>
    ServerAdmin gbyukg@163.com
    DocumentRoot "/home/gbyukg/www/sugar/"
    ServerName www.sugar.com
    ServerAlias www.sugar.com
    ErrorLog "/home/gbyukg/www/logs/error_log"
    CustomLog "/home/gbyukg/www/logs/access_log" common
    <Directory />
        Options FollowSymLinks IncludesNOEXEC Indexes
        AllowOverride All
#       Order deny,allow
        Deny from all
        Allow from all
    </Directory>
</VirtualHost>

/etc/hosts配置文件修改

127.0.0.1 www.sugar.com
127.0.0.1 www.test.com

apache安装问题:

Permission denied: make_sock: could not bind to address 0.0.0.0:80

apache/bin/httpd文件需要给普通用户增加权限才能打开1024以内到端口,修改权限:增加s为4

chmod 4755 httpd