Commit 17bd9c73b01881ed0d80399c5819198f5161479e
Exists in
master
Merge branch 'web_server_fixes' into 'master'
Web server fixes See merge request !201
Showing
2 changed files
with
15 additions
and
10 deletions
Show diff stats
README.md
| ... | ... | @@ -343,9 +343,9 @@ Run `sudo gitlab-ctl reconfigure` for the change to take effect. |
| 343 | 343 | |
| 344 | 344 | #### Use non-bundled web-server |
| 345 | 345 | |
| 346 | -By default, omnibus-gitlab installs GitLab with bundled Nginx. | |
| 347 | -To use another web server like Apache or an existing Nginx installation you will | |
| 348 | -have to do the following steps: | |
| 346 | +By default, omnibus-gitlab installs GitLab with bundled Nginx. To use another | |
| 347 | +web server like Apache or an existing Nginx installation you will have to do | |
| 348 | +the following steps: | |
| 349 | 349 | |
| 350 | 350 | Disable bundled Nginx by specifying in `/etc/gitlab/gitlab.rb`: |
| 351 | 351 | |
| ... | ... | @@ -353,16 +353,21 @@ Disable bundled Nginx by specifying in `/etc/gitlab/gitlab.rb`: |
| 353 | 353 | nginx['enable'] = false |
| 354 | 354 | ``` |
| 355 | 355 | |
| 356 | -omnibus-gitlab allows webserver access through user `gitlab-www` which resides in the group with the same name. | |
| 357 | -To allow an external webserver access to GitLab, you will need to add the webserver user to `gitlab-www` group. | |
| 358 | -Let's say that webserver user is `www-data`. Adding the user to `gitlab-www` group can be done with: | |
| 356 | +Omnibus-gitlab allows webserver access through user `gitlab-www` which resides | |
| 357 | +in the group with the same name. To allow an external webserver access to | |
| 358 | +GitLab, you will need to add the webserver user to `gitlab-www` group. Let's | |
| 359 | +say that webserver user is `www-data`. Adding the user to `gitlab-www` group | |
| 360 | +can be done with: | |
| 359 | 361 | |
| 360 | 362 | ``` |
| 361 | -usermod -G gitlab-www www-data | |
| 363 | +usermod -aG gitlab-www www-data | |
| 362 | 364 | ``` |
| 363 | 365 | |
| 364 | 366 | Run `sudo gitlab-ctl reconfigure` for the change to take effect. |
| 365 | 367 | |
| 368 | +Note: if you are using SELinux and your web server runs under a restricted | |
| 369 | +SELinux profile you may have to [loosen the restrictions on your web | |
| 370 | +server](https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache#selinux-modifications). | |
| 366 | 371 | |
| 367 | 372 | ### Adding ENV Vars to the Gitlab Runtime Environment |
| 368 | 373 | |
| ... | ... | @@ -824,10 +829,10 @@ be located at `/etc/nginx/sites-available/gitlab` and symlinked to |
| 824 | 829 | `/etc/nginx/sites-enabled/gitlab`. |
| 825 | 830 | |
| 826 | 831 | To ensure that user uploads are accessible your Nginx user (usually `www-data`) |
| 827 | -should be added to the `git` group. This can be done using the following command: | |
| 832 | +should be added to the `gitlab-www` group. This can be done using the following command: | |
| 828 | 833 | |
| 829 | 834 | ```shell |
| 830 | -sudo usermod -aG git www-data | |
| 835 | +sudo usermod -aG gitlab-www www-data | |
| 831 | 836 | ``` |
| 832 | 837 | |
| 833 | 838 | Other than the Passenger configuration in place of Unicorn and the lack of HTTPS | ... | ... |
files/gitlab-cookbooks/gitlab/templates/default/nginx.conf.erb
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # erased! To change the contents below, edit /etc/gitlab/gitlab.rb |
| 3 | 3 | # and run `sudo gitlab-ctl reconfigure`. |
| 4 | 4 | |
| 5 | -user <%= node['gitlab']['webserver']['username'] %> <%= node['gitlab']['webserver']['username']%>; | |
| 5 | +user <%= node['gitlab']['web-server']['username'] %> <%= node['gitlab']['web-server']['username']%>; | |
| 6 | 6 | worker_processes <%= @worker_processes %>; |
| 7 | 7 | error_log /var/log/gitlab/nginx/error.log; |
| 8 | 8 | pid /var/opt/gitlab/nginx/nginx.pid; | ... | ... |