【发布时间】:2018-07-10 18:08:18
【问题描述】:
我遇到这种情况,我的基于 Laravel 5.4 的网站突然出现 403 错误:
禁止。您无权访问此服务器上的 /。
但是,当我使用开发者工具清除网站的 cookie 并刷新时,它工作正常。
我正在使用 CentOS (CWP) + Apache + PHP + MySQL 配置,以下是我的网站虚拟主机。
<VirtualHost xxx.xxx.xx.xxx:80>
ServerName mywebsite.lk
ServerAlias www.mywebsite.lk
ServerAdmin webmaster@mywebsite.lk
DocumentRoot /home/mywebsite/public_html
UseCanonicalName Off
ScriptAlias /cgi-bin/ /home/mywebsite/public_html/cgi-bin/
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/mywebsite/mywebsite.lk/*.conf
<IfModule mod_userdir.c>
UserDir disabled
UserDir enabled mywebsite
</IfModule>
<IfModule mod_suexec.c>
SuexecUserGroup mywebsite mywebsite
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup mywebsite mywebsite
suPHP_ConfigPath /home/mywebsite
</IfModule>
<Directory "/home/mywebsite/public_html">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
可能是什么问题?非常感谢专家提供的任何线索和建议。
谢谢!
【问题讨论】:
标签: php laravel-5 laravel-5.4 http-status-code-403