I've just installed Bitbucket on my local server and configured it behind an apache reverse proxy. Bitbucket is working but the branch creation does not work. If I access directly using the :7990 port the branch creation works so it's definitely linked to the reverse proxy configuration.
In my server.xml I have:
but in my server config requires me to enter the baseUrl as 'http://bitbucket.mydomain.com' rather than 'https://bitbucket.mydomain.com' which otherwise it gives me the banner saying my base url config is not correct. This change to http and compression is turned off was recommended in other forum answers.
Anyone any ideas? There must be something I've missed that's causing this. I've not tested pull requests etc so expect that it may not be simply branches that are not working correctly.
The apache config on SSL is as follows:
ServerName bitbucket.mydomain.com ErrorLog /var/log/virtualmin/bitbucket.mydomain.com_error_log CustomLog /var/log/virtualmin/bitbucket.mydomain.com_access_log combined SSLEngine on SSLCertificateFile /home/bitbucket/ssl.cert SSLCertificateKeyFile /home/bitbucket/ssl.key SSLCACertificateFile /home/bitbucket/ssl.ca SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 ProxyPreserveHost On ProxyPass / http://localhost:7990/ ProxyPassReverse / http://localhost:7990/
And on port 80 is:
ServerName bitbucket.mydomain.com DocumentRoot /home/bitbucket/public_html ErrorLog /var/log/virtualmin/bitbucket.mydomain.com_error_log CustomLog /var/log/virtualmin/bitbucket.mydomain.com_access_log combined DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/bitbucket/public_html> Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted </Directory> Redirect / https://bitbucket.mydomain.com/
What I do see is when the branch create is clicked that there is a POST request to the server that is rejected with a 403 response:
[09/Jan/2017:08:40:39 +0000] "POST /rest/branch-utils/latest/projects/COM/repos/com/branches HTTP/1.1" 403 488 "https://bitbucket.mydomain.com/plugins/servlet/create-branch" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12"
so yes looks like it's something in the config between Apache and bitbucket. Any help appreciated.
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot