Professional Documents
Culture Documents
Nginx To Apache
Nginx To Apache
vi /etc/gitlab/gitlab.rb
external_url 'http://192.1468.43.197/'
Find:
# web_server['external_users'] = []
web_server['external_users'] = ['apache']
Find:
# nginx['enable'] = true
nginx['enable'] = false
gitlab-ctl reconfigure
gitlab-ctl restart
To check which group gitlab installed itself under, you can run:
getent group
Now lets modify apache's user and add it to the gitlab-www group:
usermod apache --append --groups gitlab-www
vi /etc/httpd/conf.d/gitlab.conf
<VirtualHost *:80>
ServerName 192.168.43.197
ServerSignature Off
ProxyPreserveHost On
<Location />
Order deny,allow
Allow from all
ProxyPassReverse http://127.0.0.1:8080
ProxyPassReverse http://192.168.43.197/
</Location>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined env=!dontlog
</VirtualHost>
And now restart Apache:
systemctl stop httpd
systemctl start httpd
Debugging Log
cat/var/log/httpd/error_log
On passe la commande:
/usr/sbin/setsebool -P httpd_can_network_connect 1
setenforce 1
[root@gitlab ttimco]# getenforce
Enforcing