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 11# Requires apache modules: mod_proxy and mod_proxy_http
22# In Debian based distros enable with: sudo a2enmod mod_proxy mod_proxy_http
33# 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
49
510<VirtualHost *:80>
611 ServerName gitlab.example.com
1419
1520 ProxyPass /uploads !
1621 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/
1926 ProxyPreserveHost On
2027
2128 CustomLog /var/log/apache2/gitlab/access.log combined
3643 ServerAdmin gitlab@example.com
3744
3845 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
4148
4249 ProxyPass /uploads !
4350 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 /
4653 ProxyPreserveHost On
4754
4855 CustomLog /var/log/apache2/gitlab/access.log combined
You can’t perform that action at this time.
0 commit comments