nginx https error #1730

Closed
opened 2026-02-05 01:43:46 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ztj1993 on GitHub (May 13, 2020).

I used solidnerd / bookstack: 0.29.2 to deploy the system, nginx configured SSL, now, I open the home page, CSS, JS connection exception, still use HTTP.

server {
    listen 443 ssl;
    server_name book.com;

    add_header X-Content-Type-Options nosniff;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    access_log off;

    location / {
        try_files $uri @book;
    }

    location @book {
        proxy_pass http://book.service:8080;
    }

    ssl_session_timeout 5m;
    ssl_protocols  SSLv2 SSLv3 TLSv1;
    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    ssl_certificate ssl/fullchain;
    ssl_certificate_key ssl/key;
    ssl_dhparam ssl/dhparams;
}

Originally created by @ztj1993 on GitHub (May 13, 2020). I used solidnerd / bookstack: 0.29.2 to deploy the system, nginx configured SSL, now, I open the home page, CSS, JS connection exception, still use HTTP. ``` server { listen 443 ssl; server_name book.com; add_header X-Content-Type-Options nosniff; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; access_log off; location / { try_files $uri @book; } location @book { proxy_pass http://book.service:8080; } ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; ssl_certificate ssl/fullchain; ssl_certificate_key ssl/key; ssl_dhparam ssl/dhparams; } ```
Author
Owner

@ssddanbrown commented on GitHub (May 14, 2020):

Hi @ztj1993,
Passing your BookStack base URL as an APP_URL environment variable should solve this, For examplle:

APP_URL=https://docs.example.com

How you'd do this depends on how you run your docker setup, Should be able to pass it directly as a container environment variable.

@ssddanbrown commented on GitHub (May 14, 2020): Hi @ztj1993, Passing your BookStack base URL as an `APP_URL` environment variable should solve this, For examplle: ```bash APP_URL=https://docs.example.com ``` How you'd do this depends on how you run your docker setup, Should be able to pass it directly as a container environment variable.
Author
Owner

@ztj1993 commented on GitHub (May 15, 2020):

@ssddanbrown thank you!

@ztj1993 commented on GitHub (May 15, 2020): @ssddanbrown thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1730