Last active
February 28, 2025 05:56
-
-
Save rafaelfoster/8942668 to your computer and use it in GitHub Desktop.
Gitlab SELinux Configs
This file contains 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
# The lines bellow set the Gitlab to work with SELinux | |
# As the Documentation Says: DO NOT DISABLE SELinux, just adjust it! | |
# Tips taken from: https://gitlab.com/gitlab-org/gitlab-recipes/blob/master/web-server/apache/README.md | |
setsebool -P httpd_can_network_connect on | |
setsebool -P httpd_can_network_relay on | |
setsebool -P httpd_enable_homedirs on | |
setsebool -P httpd_read_user_content on | |
semanage fcontext -a -t user_home_dir_t '/home/git(/.*)?' | |
semanage fcontext -a -t ssh_home_t '/home/git/.ssh(/.*)?' | |
semanage fcontext -a -t httpd_sys_content_t '/home/git/gitlab/public(/.*)?' | |
semanage fcontext -a -t httpd_sys_content_t '/var/git/repositories(/.*)?' | |
restorecon -R /home/git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment