mirror of
				https://github.com/gitbucket/gitbucket.git
				synced 2025-11-03 20:15:59 +01:00 
			
		
		
		
	Updated Reverse proxy with Apache (markdown)
@@ -13,41 +13,4 @@
 | 
			
		||||
 | 
			
		||||
> Note! Apache and GitBucket context paths must be equal:
 | 
			
		||||
`java -jar gitbucket.war --port=8080 --prefix=/gitbucket`
 | 
			
		||||
(Note the leading / in the prefix)
 | 
			
		||||
 | 
			
		||||
### or call it up directly from your domain, without /gitbucket folder path, while having it run off a tomcat instance
 | 
			
		||||
 | 
			
		||||
(i know all this documentation here is horrible, but this should get you to do what you need in case you desire this kind of setup. for the tomcat part, see the wiki entry on tomcat somewhere here)
 | 
			
		||||
 | 
			
		||||
`/etc/hosts`:
 | 
			
		||||
123.123.123.123 this.is.my.domain.tld
 | 
			
		||||
 | 
			
		||||
apache config example: (make sure the log locations exist and have proper rights)
 | 
			
		||||
```
 | 
			
		||||
<virtualhost *:80>                                                                                                                                                                                                                                                                 
 | 
			
		||||
        servername this.is.my.domain.tld
 | 
			
		||||
        
 | 
			
		||||
        proxypreservehost on
 | 
			
		||||
        proxypass               /       http://localhost:8080/gitbucket/
 | 
			
		||||
        proxypassreverse        /       http://localhost:8080/gitbucket/
 | 
			
		||||
 | 
			
		||||
        customlog       /var/www/this.is.my.domain.tld/logs/access.log common
 | 
			
		||||
        errorlog        /var/www/this.is.my.domain.tld/logs/error.log
 | 
			
		||||
</virtualhost>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
gitbucket config: (needed for basepath to make the proxy work actually)
 | 
			
		||||
```
 | 
			
		||||
#Tue Sep 05 01:41:42 CEST 2017
 | 
			
		||||
gravatar=false
 | 
			
		||||
notification=false
 | 
			
		||||
useSMTP=false
 | 
			
		||||
is_create_repository_option_public=true
 | 
			
		||||
ldap_authentication=false
 | 
			
		||||
ssh=true
 | 
			
		||||
allow_account_registration=false
 | 
			
		||||
ssh.host=this.is.my.domain.tld
 | 
			
		||||
allow_anonymous_access=true
 | 
			
		||||
ssh.port=1022
 | 
			
		||||
base_url=http\://this.is.my.domain.tld/
 | 
			
		||||
```
 | 
			
		||||
(Note the leading / in the prefix)
 | 
			
		||||
		Reference in New Issue
	
	Block a user