Created
August 15, 2013 10:02
-
-
Save werty1st/6239746 to your computer and use it in GitHub Desktop.
Fedora SE linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setsebool -P httpd_enable_homedirs true | |
chcon -R -t httpd_sys_content_t /home/testuser/public_html | |
setsebool -P httpd_can_network_connect 1 | |
$ sudo setsebool -P httpd_read_user_content on | |
$ sudo setsebool -P httpd_sys_script_anon_write on | |
$ sudo chcon -R -t public_content_rw_t cache/ | |
$ sudo chcon -R -t public_content_rw_t logfile.log | |
$ sudo chcon -R -h -t httpd_sys_script_rw_t cache/ | |
$ sudo chcon -R -h -t httpd_sys_script_rw_t logfile.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice summary. In Fedora I needed to run the following in order to allow Nginx to act as a reverse-proxy and connect to a local TCP server:
# Allow http server to reverse-proxy and connect to local server setsebool -P httpd_can_network_connect on
Then to allow Nginx to read from the webroot:
# This will allow reading everything in /srv. chcon -R -t httpd_sys_content_t /srv
To check the type of something you can use
ls -lZ
. For web server root it should sayhttpd_sys_content_t
notunconfined
.To check audit logs for blocks and how to unblock you can use
ausearch
andaudit2allow
: