Skip to content

Commit 70b6442

Browse files
committed
Merge pull request #201 from skarllot/master
Fixed SELinux modifications for Apache
2 parents 716eaa7 + 2a7a7a2 commit 70b6442

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

web-server/apache/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ In a RHEL6 production environment it is assumed [SELinux is enabled](http://stop
5353

5454
setsebool -P httpd_can_network_connect on
5555
setsebool -P httpd_can_network_relay on
56-
setsebool -P httpd_enable_homedirs on
5756
setsebool -P httpd_read_user_content on
58-
semanage fcontext -a -t user_home_dir_t '/home/git(/.*)?'
59-
semanage fcontext -a -t ssh_home_t '/home/git/.ssh(/.*)?'
60-
semanage fcontext -a -t httpd_sys_content_t '/home/git/gitlab/public(/.*)?'
61-
semanage fcontext -a -t httpd_sys_content_t '/home/git/repositories(/.*)?'
57+
semanage -i - <<EOF
58+
fcontext -a -t user_home_dir_t '/home/git(/.*)?'
59+
fcontext -a -t ssh_home_t '/home/git/.ssh(/.*)?'
60+
fcontext -a -t httpd_sys_content_t '/home/git/gitlab/public(/.*)?'
61+
fcontext -a -t httpd_sys_content_t '/home/git/repositories(/.*)?'
62+
EOF
6263
restorecon -R /home/git
6364

6465
**Note:** `semanage` is part of the `policycoreutils-python` package.

0 commit comments

Comments
 (0)