修改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