I'm trying to get Bitbucket working with a SSL and no port number however it just doesn't seem to want to work. I'm on version 7.1 and I've modified the properties file and the nginx config file for default as instructed and I just cant get it to work. Here is my code
Nginx conf:
server {
listen 80;
server_name git.example.com;
rewrite ^ https://git.example.com$request_uri? permanent;
}
server {
listen 80;
server_name git.example.com;
root /var/www/bitbucket;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name git.example.com;
root /var/www/bitbucket;
ssl on;
ssl_certificate /etc/letsencrypt/live/git.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/git.example.com/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location /secure/ForgotLoginDetails.jspa {
return 301 https://git.example.com;
}
location /bitbucket {
proxy_pass http://localhost:7990/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
}/var/atlassian/application-data/bitbucket/shared/bitbucket.properties:
:server.port=7990
server.secure=true
server.scheme=https
server.proxy-port=443
server.proxy-name=git.example.com
server.context-path=/bitbucket
Right now all I get is
403 Forbidden
Please help! Been trying for two days to make this work. Thank you!!