How SELinux is disabled in Linux

Source: Internet
Author: User

When I migrated Apache Web server a few days ago, I found that the page using reverse proxy cannot be displayed. The reverse proxy configuration in the Apache configuration file is as follows:

    ProxyRequests Off
    ProxyPass /homepage/ http://192.168.120.35:9902/homepage/
    ProxyPassReverse /homepage/ http://192.168.120.35:9902/homepage/

After checking the information on the Internet, we found that SELinux was playing a strange role. Now we have recorded the information and will continue to improve it later.
1. temporarily disable SELinux:
Root @ server # setenforce 0

After the server is restarted, SELinux will still be started,
2. Permanently disabled:
Open the SELinux configuration file on the server. The default value is/etc/SELinux/config. The content is as follows:

# This file controls the state of SELinux on the system.
# SELinux = can take one of these three values:
# Enforcing-SELinux security policy is enforced.
# Permissive-SELinux prints warnings instead of enforcing.
# Disabled-SELinux is fully disabled.
SELinux = enforcing
# Selinuxtype = type of policy in use. Possible values are:
# Targeted-only targeted network daemons are protected.
# Strict-full SELinux protection.
Selinuxtype = targeted

Set
SELinux = enforcing changed to: SELinux = Disable disable SELinux

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.