Disable SELinux for only Apache / httpd in Linux
Q. How do I disable SELinux protection for only Apache web server in Linux? I'm using CentOS Linux server.
A. You can disable Apache SELinux protection easily. Please keep in mind that by disabling SELinux for apache you are inviting more security related problems.
Disable Apache SELinux Protection
Open /etc/selinux/targeted/booleans file using a text editor:
# vi /etc/selinux/targeted/booleans
Append or modify value for httpd_disable_trans as follows:
httpd_disable_trans=1
Save and close the file. Type the following two commands:
# setsebool httpd_disable_trans 1
# /etc/init.d/httpd restart
GUI tool to disable SELinux for Apache
Open a shell prompt
Type the command system-config-securitylevel
system-config-securitylevel &
Next select SELinux tab > click on Disable SELinux protection for httpd daemon checkbox > Save the changes
Finally restart httpd service:
# /etc/init.d/httpd restart
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Apache Address already in use: make_sock: could not bind to port 80 or 443 error and solution
- Turn off: disable selinux (Security-Enhanced Linux)
- Display the security context associated with files or directories under SELinux kernel
- Linux disable or enable ExecShield protection
- How to Linux re apply or restore SELinux security labels context
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: apache_web_server, centos_linux, disable_selinux, httpd, linux_server



March 24th, 2008 at 1:16 pm
setsebool httpd_disable_trans 1
Could not change active booleans: Invalid boolean