[英]403:You don't have permission to access /index.php on this server
I'm facing the following message when I visit my website: 当我访问我的网站时,我面临以下消息:
You don't have permission to access /index.php on this server. 您无权访问此服务器上的/index.php。
I am able to visit my other website in same URL, as in http://xiukun.wang/scrapy/
, but http://xiukun.wang/datavis/
doesn't work. 我可以使用与http://xiukun.wang/scrapy/
相同的URL访问其他网站,但是http://xiukun.wang/datavis/
不起作用。
I have tried many methods to solve it, like editing my httpd.conf
file, however it doesn't work. 我尝试了许多方法来解决它,例如编辑我的httpd.conf
文件,但是它不起作用。 How do I solve it? 我该如何解决?
<Directory "/alidata/www">
AllowOverride none
Require all granted
</Directory>
DocumentRoot "/alidata/www"
<Directory "/alidata/www">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
Have you changed anything in your .htaccess file? 您是否更改了.htaccess文件中的任何内容? Also did you change anything in config file such as DB name user and pass? 您还更改了配置文件中的任何内容,例如DB名称user和pass吗?
Also update the permissions to 755 of your public_html. 还将权限更新为您的public_html的755。
EDIT 编辑
Since you specified its apache, try these solutions: 由于您指定了其apache,请尝试以下解决方案:
Check your Directive DirectoryIndex and make sure your index is listed, or else upload: 检查您的Directive DirectoryIndex并确保列出您的索引,否则上传:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
Check for correct dir permissions: 检查正确的目录权限:
<Directory "/home/domain/www"> Options +Indexes FollowSymLinks +ExecCGI AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory>
Modify file system permissions of Home directory that APACHE is installed: 修改已安装APACHE的主目录的文件系统权限:
#chmod a+x /apache-home-dir-of installation
Make sure the CGI script requested have executable permissions set on files. 确保请求的CGI脚本对文件设置了可执行权限。 Use chmod command to set permission: 使用chmod命令设置权限:
$ chmod +x file.cgi
Check APACHE logs for errors: 检查APACHE日志中的错误:
# tail -f /path/to/apache/error.logs
Source: https://www.cyberciti.biz/faq/apache-403-forbidden-error-and-solution/ 资料来源: https : //www.cyberciti.biz/faq/apache-403-forbidden-error-and-solution/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.