我有和访问已启用的虚拟主机时出现 403 Forbidden 错误,但我尝试了提供的解决方案,仍然收到 403 Forbidden,我的网站名为项目,它的配置文件在/etc/apache2/站点可用如下:
<VirtualHost *:80>
ServerAdmin webmaster@reweb
ServerName www.online.project.com
ErrorLog /logs/project-errors.log
DocumentRoot /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar/public
<Directory /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar>
Order Deny,Allow
Allow from all
Options Indexes
</Directory>
尝试更改所有者/home/joarobles/Zend/workspaces/DefaultWorkspace7/online.cobico.com.ar到www:数据:www-数据使用递归,但仍然出现此错误项目错误日志:
[Mon Jan 31 01:26:01 2011] [crit] [client 127.0.0.1] (13)Permission denied: /home/joarobles/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
有什么想法吗?谢谢!
答案1
您需要对主文件夹具有读取和执行权限。如果您这样做,sudo chmod o+rx /home/joarobles
则此错误应该可以解决。
答案2
尝试在您的 Web 根目录的标签<directory />
前插入标签。<directory>
...
DocumentRoot /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar>
...
它可能会有帮助。