cptactionhank / docker-atlassian-jira

Atlassian JIRA Core wrapped in a Docker image
https://cptactionhank.github.io/docker-atlassian-jira
MIT License
623 stars 247 forks source link

Running jira as https #62

Closed hassanakhtar closed 6 years ago

hassanakhtar commented 6 years ago

I am trying to run the docker as

docker run --detach --name "jira-prod" \ --publish "8080:8080" \ --env "CATALINA_OPTS=-Xms1024m -Xmx1024m -Datlassian.plugins.enable.wait=300" \ --env "X_PROXY_NAME=jira.domain.com" \ --env "X_PROXY_SCHEME=https" \ --env "X_PROXY_PORT=443" \ cptactionhank/atlassian-jira:latest

But I can still access the instance on http and not https. Am I doing something wrong or misconfiguring somehow? I am using nginx on front, but my understanding is that it should at least run on: https://IP:PORT and then i will point my FQDN to this specific port using nginx.

Thanks a lot for the great docker image. :+1:

cptactionhank commented 6 years ago

I think your NGINX configuration is wrong and your env flags looks right. It works on my machine(tm) just fine

hassanakhtar commented 6 years ago

Yeah if we keep NGINX aside, it should at least work with https://, but it is working as http://

This is my NGINX config

server {
    listen 80;
    server_name jira.domain.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name jira.domain.com;

    ssl_certificate /etc/ssl/certs/wildcard.domain.com.pem;
    ssl_certificate_key /etc/ssl/certs/wildcard.domain.com.pem;

    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH;

    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 1m;
    access_log /var/log/nginx/jira.access.log;

    location / {
        proxy_pass http://IP:PORT;
    }
}
hassanakhtar commented 6 years ago

Thanks, the configurations and all were correct. My bad that the server's firewall was blocking the port.