Taiga docker and SSL Certificate

Hello Community,

I need your help.

I have setup a fresh taiga installation with docker and it works with http on port 9000.

I have generated SSL Certificates from my internal PKI but I don’t understand how to configure my taiga instance to work with https.

My docker-compose.yml file:

Blockquote
taiga-front:
image: taigaio/taiga-front:latest
environment:
TAIGA_URL: “${TAIGA_SCHEME}://${TAIGA_DOMAIN}”
TAIGA_WEBSOCKETS_URL: “${WEBSOCKETS_SCHEME}://${TAIGA_DOMAIN}”
TAIGA_SUBPATH: “${SUBPATH}”
# …your customizations go here
networks:
- taiga
# volumes:
# - ./conf.json:/usr/share/nginx/html/conf.json
taiga-gateway:
image: nginx:1.19-alpine
ports:
- “9000:80”
volumes:
- ./taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
- taiga-static-data:/taiga/static
- taiga-media-data:/taiga/media
networks:
- taiga
depends_on:
- taiga-front
- taiga-back
- taiga-events
Blockquote

My .env file:

Blockquote
TAIGA_SCHEME=http # serve Taiga using “http” or “https” (secured) connection
TAIGA_DOMAIN=taiga.internal.test.com:9000 # Taiga’s base URL
SUBPATH=“” # it’ll be appended to the TAIGA_DOMAIN (use either “” or a “/subpath”)
WEBSOCKETS_SCHEME=ws # events connection protocol (use either “ws” or “wss”)
Blockquote

My nginx.conf file:

Blockquote
server {
# listen 80 default_server;
server_name taiga.internal.test.com;
client_max_body_size 100M;
charset utf-8;
Blockquote

When I configure https, the web site is not responding (even in http). I have spend some hours on Google, test some configuration but nothing is working :frowning: !

Thanks for your help.

Hi there!

Have you checked this article?

Best regards!

Hi,

It works !

My .env file:

# Taiga's URLs - Variables to define where Taiga should be served
TAIGA_SCHEME=https  # serve Taiga using "http" or "https" (secured) connection
TAIGA_DOMAIN=taiga.internal.test.com  # Taiga's base URL
SUBPATH="" # it'll be appended to the TAIGA_DOMAIN (use either "" or a "/subpath")
WEBSOCKETS_SCHEME=wss  # events connection protocol (use either "ws" or "wss")

My docker-compose.yml file:

  taiga-gateway:
    image: nginx:1.19-alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
      - ./taiga-gateway/certs/taiga.internal.test.com.crt:/etc/nginx/ssl/taiga.internal.test.com.crt
      - ./taiga-gateway/certs/taiga.internal.test.com.key:/etc/nginx/ssl/taiga.internal.test.com.key
      - taiga-static-data:/taiga/static
      - taiga-media-data:/taiga/media
    networks:
      - taiga
    depends_on:
      - taiga-front
      - taiga-back
      - taiga-events

My taiga.conf (nginx) file:

server {
    listen 80 default_server;
    server_name taiga.internal.test.com;
    # Redirect all HTTP requests to HTTPS
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name taiga.internal.test.com;
    ssl_certificate /etc/nginx/ssl/taiga.internal.test.com.crt;
    ssl_certificate_key /etc/nginx/ssl/taiga.internal.test.com.key;

Thanks for your help

1 Like