【发布时间】:2014-06-29 11:24:40
【问题描述】:
我收到消息:
Forbidden
You don't have permission to access / on this server.
Apache 的路径是:/var/www。我的配置(/etc/apache2/{apache.conf, httpd.conf})是正确的,因为在其他时候,它是有效的。 /var/www 文件夹的权限为:755。
问题是:我删除了根 (/root) ant 的主文件夹,然后出现此错误...
/sites-available/000-defaults的文件配置:
DocumentRoot /var/www/
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Location /php/cron>
Order Deny,Allow
Deny from all
Allow from localhost ip6-localhost 176.9.21.77
Satisfy any
</Location>
Apache的错误日志:
(13)Permission denied: /.htaccess pcfg_openfile: 无法检查 htaccess 文件,确保它是可读的
【问题讨论】:
标签: apache