Linux Centos7 Apache access You don't have permission to access/on this server., centos7permission
After a long time, I found the most correct answer today. It's really not easy to say.
99% of the content collected by Baidu is incorrect.
You don't have permission to access / on this server.
Baidu's solution:
1) Disable selinux. The server has not enabled selinux.
2) Modify allow from all in httpd. conf! Pitfall: Apache is more than 2.4, and there is no allow from all. Now it is changed to Require all granted!
3) Modify chcon-R httpd_user_content_t! The root of CentOS7 does not have such a context, because selinux is not enabled at all.
4) Modify chown apache:-R/home/xxx.com/public_html! Mistaken child! In this way, the directory is changed, but the original user has no permission to access the directory! Funny !!!
......
Baidu spent more than an hour solving this problem. All the web pages are filled with a lot of advertisements.
The largest search engine in China searches for ads-filled collection sites! The collection site does not matter. The key is that all advertisements cannot be read even if they are normal!
Finally, the correct solution is as follows:
Chmod o + x/home/zbphp.com
The x execution permission must be added to other user groups in the upper-level directory. Otherwise, Apache cannot read the permission!
At the end of the article, I would like to thank the enthusiastic segmentfault community. Otherwise, I may have to give up for a few days. Whining, What Baidu searched on the Internet is not accurate at all! Goagent is always intermittent and unfamiliar with English. When I am confused, I feel like a chaoxian. I am backward but I feel good about myself. Many people use Baidu and feel proud and patriotic. (By default7@zbphp.com)
Linux apache Forbidden You don't have permission to access/on this server
You don't have permission to access/on this server.
You do not have permission to access/directory
/Etc/httpd. conf file configuration
<Directory/>
AllowOverride None
Order allow, deny
# Allow from all -------------- this line is commented out to allow all access
</Directory>
The default root directory is)
/Home // lamp/apache243/htdocs
An error occurred while accessing the php webpage after installing apache and php. Forbidden You don't have permission to access/on this server
It means that you do not have the permission to access the website. Are you not configuring httpd. conf?