Skip to content

Apache2 / ISPConfig Proxy w. GitLab 502 Error #314

Open
@yupthatguy

Description

@yupthatguy

My server is running an ISPConfig control panel on port 8080, so I am trying to configure a proxy for Gitlab on port 9000, however, I am getting a 502 error. There is likely an obvious mistake that I am missing.

`System information
System:		Debian 10
Current User:	git
Using RVM:	no
Ruby Version:	2.7.2p137
Gem Version:	3.1.4
Bundler Version:2.1.4
Rake Version:	13.0.3
Redis Version:	6.0.12
Git Version:	2.31.1
Sidekiq Version:5.2.9
Go Version:	go1.11.6 linux/amd64

GitLab information
Version:	13.12.4
Revision:	02b97bd2a77
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	12.6
URL:		http://dev.example.com
HTTP Clone URL:	http://dev.example.com/some-group/some-project.git
SSH Clone URL:	[email protected]:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: 

GitLab Shell
Version:	13.18.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

My /etc/gitlab/gitlab.rb contains:

web_server['external_users'] = ['www-data']
web_server['username'] = 'apache'
web_server['group'] = 'apache'
nginx['enable'] = false
external_url 'http://dev.example.com'
gitlab_rails['trusted_proxies'] = ['192.168.0.10']
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:9000" 

And, my /etc/apache2/sites-enabled/100-dev.example.com.vhost contains:

<Directory /var/www/dev.example.com>
		AllowOverride None
				Require all denied
		</Directory>

<VirtualHost *:80>


									DocumentRoot /var/www/dev.example.com/web
						
		ServerName dev.example.com
		ServerAdmin [email protected]


		ErrorLog /var/log/ispconfig/httpd/dev.example.com/error.log

		Alias /error/ "/var/www/dev.example.com/web/error/"
		ErrorDocument 400 /error/400.html
		ErrorDocument 401 /error/401.html
		ErrorDocument 403 /error/403.html
		ErrorDocument 404 /error/404.html
		ErrorDocument 405 /error/405.html
		ErrorDocument 500 /error/500.html
		ErrorDocument 502 /error/502.html
		ErrorDocument 503 /error/503.html


		<Directory /var/www/dev.example.com/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +SymlinksIfOwnerMatch
				AllowOverride All
								Require all granted
								<Files ~ '.php[s3-6]{0,1}$'>
												Require all denied
										</Files>
		</Directory>
		<Directory /var/www/clients/client0/web8/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +SymlinksIfOwnerMatch
				AllowOverride All
								Require all granted
								<Files ~ '.php[s3-6]{0,1}$'>
										Require all denied
									</Files>
		</Directory>


		# add support for apache mpm_itk
		<IfModule mpm_itk_module>
			AssignUserId web8 client0
		</IfModule>

		<IfModule mod_dav_fs.c>
		# Do not execute PHP files in webdav directory
			<Directory /var/www/clients/client0/web8/webdav>
				<ifModule mod_security2.c>
					SecRuleRemoveById 960015
					SecRuleRemoveById 960032
				</ifModule>
				<FilesMatch "\.ph(p3?|tml)$">
					SetHandler None
				</FilesMatch>
			</Directory>
			DavLockDB /var/www/clients/client0/web8/tmp/DavLock
			# DO NOT REMOVE THE COMMENTS!
			# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
			# WEBDAV END
		</IfModule>

			
ServerName dev.example.com
  ServerAdmin [email protected]
    ServerSignature Off

    ProxyPreserveHost On
  
  <Proxy *>
     Require all granted
  </Proxy>
  
  ProxyPass / http://127.0.0.1:9000/
  ProxyPassReverse / http://dev.example.com/
  
   AllowEncodedSlashes NoDecode
 
 
  <Location />

    Require all granted


  </Location>
  
  
  RewriteEngine on
			
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
  RewriteCond %{REQUEST_URI} ^/uploads/.*
  RewriteRule .* http://127.0.0.1:9000%{REQUEST_URI} [P,QSA,NE]

	

</VirtualHost>

Any tips on what I am missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions