File tree Expand file tree Collapse file tree 2 files changed +38
-6
lines changed Expand file tree Collapse file tree 2 files changed +38
-6
lines changed Original file line number Diff line number Diff line change
1
+ ## CentOS notes
2
+
3
+ In CentOS the apache logs are under ` /var/log/httpd ` so you have to either replace
4
+ ` apache ` with ` httpd ` in ` gitlab.conf ` or create the ` /var/log/apache2 ` directory.
5
+
6
+ ## Puma or unicorn
7
+
8
+ ### unicorn
9
+
10
+ Make sure that ` /home/git/gitlab/config/unicorn.rb ` exists
11
+ The default server is unicorn, so ` gitlab.conf ` is configured to listen on port ` 8080 ` .
12
+
13
+ ### puma
14
+
15
+ Info taken from [ PR #87 ] ( https://github.com/gitlabhq/gitlab-recipes/pull/87 ) .
16
+
17
+ As apache's mod_proxy [ doesn't support] [ sock ] sockets, we have to configure the
18
+ proxy URL to use tcp instead of unix sockets. First make sure that ` /home/git/gitlab/config/puma.rb ` exists.
19
+ Then you have to make 2 changes:
20
+
21
+ 1 . In ` gitlab.conf ` replace ` http://127.0.0.1:8080/ ` with ` http://0.0.0.0:9292/ `
22
+ 2 . Edit ` puma.rb ` : comment out ` bind 'tcp://0.0.0.0:9292' ` and comment ` bind "unix://#{application_path}/tmp/sockets/gitlab.socket" `
23
+
24
+
25
+ [ sock ] : http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
Original file line number Diff line number Diff line change 1
1
# Requires apache modules: mod_proxy and mod_proxy_http
2
2
# In Debian based distros enable with: sudo a2enmod mod_proxy mod_proxy_http
3
3
# Change ServerName to your fqdn
4
+ #
5
+ # You need to run openssl to generate a self-signed ssl certificate:
6
+ # cd /etc/apache2 (or /etc/httpd)
7
+ # sudo openssl req -new -x509 -nodes -days 3560 -out gitlab.crt -keyout gitlab.key
8
+ # sudo chmod o-r gitlab.key
4
9
5
10
<VirtualHost *:80>
6
11
ServerName gitlab.example.com
14
19
15
20
ProxyPass /uploads !
16
21
ProxyPass /error !
17
- ProxyPass / http://127.0.0.1:3000/
18
- ProxyPassReverse / http://127.0.0.1:3000/
22
+
23
+ # If you use puma, see https://github.com/gitlabhq/gitlab-recipes/blob/master/web-server/apache/README.md
24
+ ProxyPass / http://127.0.0.1:8080/
25
+ ProxyPassReverse / http://127.0.0.1:8080/
19
26
ProxyPreserveHost On
20
27
21
28
CustomLog /var/log/apache2/gitlab/access.log combined
36
43
37
44
38
45
SSLEngine On
39
- SSLCertificateFile /etc/apache2/ssl/server .crt
40
- SSLCertificateKeyFile /etc/apache2/ssl/server .key
46
+ SSLCertificateFile /etc/apache2/gitlab .crt
47
+ SSLCertificateKeyFile /etc/apache2/gitlab .key
41
48
42
49
ProxyPass /uploads !
43
50
ProxyPass /error !
44
- ProxyPass / http://127.0.0.1:3000 /
45
- ProxyPassReverse / http://127.0.0.1:3000 /
51
+ ProxyPass / http://127.0.0.1:8080 /
52
+ ProxyPassReverse / http://127.0.0.1:8080 /
46
53
ProxyPreserveHost On
47
54
48
55
CustomLog /var/log/apache2/gitlab/access.log combined
You can’t perform that action at this time.
0 commit comments