从源头安装。 gitlab 7.4.5
独角兽正在监听9095.Apache是2.2.9,我没有使用https。
System information
System: CentOS 6.7
Current User: git
Using RVM: no
Ruby Version: 2.1.2p95
Gem Version: 2.2.2
Bundler Version:1.11.2
Rake Version: 10.3.2
Sidekiq Version:2.17.0
GitLab information
Version: 7.4.5
Revision: 19d572e
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://gitlab.example.com
HTTP Clone URL: http://gitlab.example.com/some-project.git
SSH Clone URL: [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.0.1
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
修改configuration file apache 2.2适合我。
gitlab 6.0的另一个旧配置文件是here,它也适用于我。
#This configuration has been tested on GitLab 8.0.0
#Note this config assumes unicorn is listening on default port 8080 and gitlab-git-http-server is listening on port 8181.
#To allow gitlab-git-http-server to listen on port 8181, edit or create /etc/default/gitlab and change or add the following:
#gitlab_git_http_server_options="-listenUmask 0 -listenNetwork tcp -listenAddr localhost:8181 -authBackend http://127.0.0.1:8080"
#Module dependencies
# mod_rewrite
# mod_proxy
# mod_proxy_http
# HTTP Configuration
<VirtualHost *:80>
ServerName gitlab.example.com
ServerSignature Off
ProxyPreserveHost On
# Ensure that encoded slashes are not decoded but left in their encoded state.
# http://doc.gitlab.com/ce/api/projects.html#get-single-project
AllowEncodedSlashes NoDecode
# Ensure that encoded slashes are not decoded but left in their encoded state.
# http://doc.gitlab.com/ce/api/projects.html#get-single-project
#AllowEncodedSlashes NoDecode
<Location />
#Require all granted
Order deny,allow
Allow from all
#Allow forwarding to gitlab-git-http-server
#ProxyPassReverse http://127.0.0.1:8181
#Allow forwarding to GitLab Rails app (Unicorn)
ProxyPassReverse http://127.0.0.1:9095
ProxyPassReverse http://gitlab.example.com/
</Location>
#apache equivalent of nginx try files
# http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on
#Forward these requests to gitlab-git-http-server
#Forward these requests to gitlab-git-http-server
#RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/repository/archive.* [OR]
#RewriteCond %{REQUEST_URI} ^/api/v3/projects/.*/repository/archive.* [OR]
#RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$
#RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
#Forward any other requests to GitLab Rails app (Unicorn)
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads
RewriteRule .* http://127.0.0.1:9095%{REQUEST_URI} [P,QSA,NE]
# needed for downloading attachments
DocumentRoot /home/git/gitlab/public
#Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
ErrorDocument 404 /404.html
ErrorDocument 422 /422.html
ErrorDocument 500 /500.html
ErrorDocument 503 /deploy.html
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
ErrorLog logs/gitlab.example.com_error.log
CustomLog logs/gitlab.example.com_forwarded.log common_forwarded
CustomLog logs/gitlab.example.com_access.log combined env=!dontlog
CustomLog logs/gitlab.example.com.log combined
</VirtualHost>
希望对从源代码安装gitlab旧版本的人有用。
您可能还需要sudo a2enmod proxy_http – xtian 2015-04-08 15:42:14
如果您收到权限错误,如“您无权访问此服务器上的/assets/logo-white-0b53cd4ea06811d79b3acd486384e047.png”。那么你需要“需要全部授予” –
xtian
2015-04-08 15:46:40
我的独角兽进程名是config.ru,所以我subjet使用netstat -pant | grep 8080 – themadmax 2015-08-12 14:40:16