After the CentOS server is restarted, the website displays 403 Forbidden

Source: Internet
Author: User
Tags centos server
After the CentOS server is restarted, there is no such problem before the 403 Forbidden restart occurs on the website. for apache server, please check out the problem. if nothing else happens, restart the server.


Reply to discussion (solution)

Look at this, right number seat http://baike.baidu.com/link? Url = H9e6bCRfpSwVvrKjY_5oRT9qPOEXr3-lcgwwLPDGK7gXggG7S-JAkJ0E1cT4jy2sqnxNRzFhsEplmOVAsFoVEK

What about php-fpm? Firewall?

What about php-fpm? Firewall?
Php runs in the form of an apache module, and the firewall also allows port 80. However, when you change the program to a directory in apache/etc/passwd, the access is successful, it's the original directory. why 403?

In which Directory is the original directory?
It is estimated that the httpd. conf file is affected. check the error log.


What about php-fpm? Firewall?
Php runs in the form of an apache module, and the firewall also allows port 80. However, when you change the program to a directory in apache/etc/passwd, the access is successful, it's the original directory. I don't know why 403 is the permission lost?

In which Directory is the original directory?
It is estimated that the httpd. conf file is affected. check the error log.
The problem is that you do not have permission to the directory where the website is located. the directory where my website is located is/data/xxxx. you can access it by testing/data, but the xxxx under it cannot be accessed.

Check the permission of xxxx. if the permission is insufficient, modify the permission.

Check the permission of xxxx. if the permission is insufficient, modify the permission.
However, the permissions should be okay. 755. The owner and group are apache.



What about php-fpm? Firewall?
Php runs in the form of an apache module, and the firewall also allows port 80. However, when you change the program to a directory in apache/etc/passwd, the access is successful, it's the original directory. I don't know why 403 is the permission lost?
What does permission loss mean?

Rechmod-R... reboot apache.

Permission problem, chown-R xxx: xx

The reason is found, because selinux is automatically enabled after each boot, and selinun is enabled, which will cause this problem. thank you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.