File tree Expand file tree Collapse file tree 1 file changed +22
-8
lines changed Expand file tree Collapse file tree 1 file changed +22
-8
lines changed Original file line number Diff line number Diff line change 1
- # CentOS related Nginx notes
1
+ ## CentOS related Nginx notes
2
2
3
- * If nginx is installed through the package manager, adjust sites in ` /etc/nginx/ conf.d/ ` instead of ` /etc/nginx/sites-available/ ` .
3
+ ### Different conf directories
4
4
5
- * Replace the default ` nginx ` user with ` git ` and group ` root ` in ` /etc/nginx/nginx.conf ` :
5
+ If nginx is installed through the package manager, adjust sites in ` /etc/nginx/conf.d/ `
6
+ instead of ` /etc/nginx/sites-available/ ` or create those directories and tell ` nginx `
7
+ to monitor them:
6
8
7
- #user nginx;
8
- user git root;
9
+ sudo mkdir /etc/nginx/sites-{available,enabled}
9
10
10
- or add ` nginx ` user to ` git ` group.
11
+ Then edit ` /etc/nginx/nginx.conf ` and replace ` include /etc/nginx/conf.d/*.conf; `
12
+ with ` /etc/nginx/sites-enabled/*; `
11
13
12
- sudo usermod -a -G git nginx
13
- sudo chmod g+rx /home/git/
14
+ ### Give nginx access to git group
15
+
16
+ In order for GitLab to display properly you have to make either one of the changes
17
+ below. The first one is recommended.
18
+
19
+ Add ` nginx ` user to ` git ` group:
20
+
21
+ sudo usermod -a -G git nginx
22
+ sudo chmod g+rx /home/git/
23
+
24
+ or replace the default ` nginx ` user with ` git ` and group ` root ` in ` /etc/nginx/nginx.conf ` :
25
+
26
+ #user nginx;
27
+ user git root;
You can’t perform that action at this time.
0 commit comments