Use unicorn by default. Add info for puma use, implement #87

This commit is contained in:
Axilleas Pipinellis
2013-08-18 16:09:47 +03:00
parent d874d1c473
commit 9833fc52a7
2 changed files with 38 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
## CentOS notes
In CentOS the apache logs are under `/var/log/httpd` so you have to either replace
`apache` with `httpd` in `gitlab.conf` or create the `/var/log/apache2` directory.
## Puma or unicorn
### unicorn
Make sure that `/home/git/gitlab/config/unicorn.rb` exists
The default server is unicorn, so `gitlab.conf` is configured to listen on port `8080`.
### puma
Info taken from [PR #87](https://github.com/gitlabhq/gitlab-recipes/pull/87).
As apache's mod_proxy [doesn't support][sock] sockets, we have to configure the
proxy URL to use tcp instead of unix sockets. First make sure that `/home/git/gitlab/config/puma.rb` exists.
Then you have to make 2 changes:
1. In `gitlab.conf` replace `http://127.0.0.1:8080/ ` with `http://0.0.0.0:9292/`
2. Edit `puma.rb`: comment out `bind 'tcp://0.0.0.0:9292'` and comment `bind "unix://#{application_path}/tmp/sockets/gitlab.socket"`
[sock]: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

View File

@@ -1,6 +1,11 @@
# Requires apache modules: mod_proxy and mod_proxy_http
# In Debian based distros enable with: sudo a2enmod mod_proxy mod_proxy_http
# Change ServerName to your fqdn
#
# You need to run openssl to generate a self-signed ssl certificate:
# cd /etc/apache2 (or /etc/httpd)
# sudo openssl req -new -x509 -nodes -days 3560 -out gitlab.crt -keyout gitlab.key
# sudo chmod o-r gitlab.key
<VirtualHost *:80>
ServerName gitlab.example.com
@@ -14,8 +19,10 @@
ProxyPass /uploads !
ProxyPass /error !
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
# If you use puma, see https://github.com/gitlabhq/gitlab-recipes/blob/master/web-server/apache/README.md
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ProxyPreserveHost On
CustomLog /var/log/apache2/gitlab/access.log combined
@@ -36,13 +43,13 @@
ServerAdmin gitlab@example.com
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
SSLCertificateFile /etc/apache2/gitlab.crt
SSLCertificateKeyFile /etc/apache2/gitlab.key
ProxyPass /uploads !
ProxyPass /error !
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ProxyPreserveHost On
CustomLog /var/log/apache2/gitlab/access.log combined