Hi,
My ISP blocks port 443 so I have nginx listening for SSL on port 444. I’m having some trouble setting up SSL for bookstack and accessing via the internet. I’m new to docker and self-hosting, so some help would be greatly appreciated!
My docker-compose file is this -
version: "2"
services:
bookstack:
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
networks:
- nginx
environment:
- PUID=1000
- PGID=1000
- APP_URL= http://192.168.1.165:6875
- DB_HOST=bookstack_db
- DB_USERNAME=bookstack
- DB_PASSWORD=<redacted>
- DB_DATABASE=bookstackapp
volumes:
- ./config:/config
ports:
- 6875:80
restart: unless-stopped
depends_on:
- bookstack_db
bookstack_db:
image: lscr.io/linuxserver/mariadb:latest
container_name: bookstack_db
networks:
- nginx
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=<redacted>
- TZ=Europe/London
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=<redacted>
volumes:
- ./config:/config
restart: unless-stopped
networks:
nginx:
external: true
and my nginx proxy host file is this -
server {
set $forward_scheme http;
set $server "192.168.1.165";
set $port 6875;
listen 80;
listen [::]:80;
listen 444 ssl http2;
listen [::]:444 ssl http2;
server_name bookstack.domain.tld;
# Let's Encrypt SSL
include conf.d/include/letsencrypt-acme-challenge.conf;
include conf.d/include/ssl-ciphers.conf;
ssl_certificate /etc/letsencrypt/live/npm-11/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/npm-11/privkey.pem;
# Asset Caching
include conf.d/include/assets.conf;
# Block Exploits
include conf.d/include/block-exploits.conf;
# Force SSL
include conf.d/include/force-ssl.conf;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
access_log /data/logs/proxy-host-8_access.log proxy;
error_log /data/logs/proxy-host-8_error.log warn;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
# Proxy!
include conf.d/include/proxy.conf;
}
# Custom
include /data/nginx/custom/server_proxy[.]conf;
}