Tool
Gitlab - Apach 로 띄우기.
고.니
2021. 10. 18. 23:08
반응형
Step 1. 설정변경
vi /etc/gitlab/gitlab.rb
|
################################################################################
## GitLab NGINX
##! Docs: https://docs.gitlab.com/omnibus/settings/nginx.html
################################################################################
# nginx['enable'] = true
# 주석해제해서 nginx 사용안함 설정.
nginx['enable'] = false
# gitlab_workhorse['shutdown_timeout'] = nil # gitlab_workhorse['listen_network'] = "unix" # gitlab_workhorse['listen_umask'] = 000 # gitlab_workhorse['listen_addr'] = "/var/opt/gitlab/gitlab-workhorse/sockets/socket" # gitlab_workhorse['auth_backend'] = "http://localhost:8080" # 아래 두줄 추가. gitlab_workhorse['listen_network'] = "tcp" gitlab_workhorse['listen_addr'] = "127.0.0.1:8181" # 아파치가 다른 서버라면 # gitlab_workhorse['listen_addr'] = "0.0.0.0:8181" |
Step 2.설정적용
gitlab-ctl reconfigure
|
Step 3.아파치설정
참조 : https://gitlab.com/gitlab-org/gitlab-recipes/-/blob/master/web-server/apache/gitlab-apache24.conf
<VirtualHost *:80>
ServerAdmin 관리자이메일
DocumentRoot "/opt/gitlab/embedded/service/gitlab-rails/public"
ServerName 도메인_혹은_IP
ServerAlias 도메인_혹은_IP
ErrorLog "logs/도메인_혹은_IP-error_log"
CustomLog "logs/도메인_혹은_IP-access_log" common
ProxyRequests Off
ProxyPreserveHost On
ProxyPassReverse / http://localhost:8181/
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
|
반응형