Jlesage / docker-baseimage-gui

I am trying to get jlesage/docker-baseimage-gui) working with Caddy.

A working config for nginx is below from the author. I am just not sure how to translate nginx to Caddy.

location / {
proxy_pass http://localhost:5800/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}

We don’t really have enough information to go off of here. Please give a more detailed description.

As for the config, I think all you need is this in Caddy v2:

reverse_proxy localhost:5000

Thanks for the suggestion. I am running Caddy in a docker container and it is version 1.0.3. I will look and see if I can find a container with version 2 and give that a try.

I have tried the config below. It works inside my network, but not outside it. The page loads, but the frame witht he X Application in it is blank.

proxy / 192.168.1.103:5800/ { # GitHub - JiriS97/docker-calibre-gui: Docker image for running Calibre e-book manager in docker with in-browser gui
transparent

Caddy v2 has an official docker image!

https://hub.docker.com/_/caddy

Again, you’re really not giving us anywhere near enough information to go on. We ask that you fill out the thread template, it’s very important so that we can properly understand what’s going on.

1 Like

Here is the template.

1. My Caddy version (caddy version):

1.0.3

2. How I run Caddy:

Docker container abiosoft/caddy

a. System environment:

Docker version 19.03.8 on Windows 10.0.18363.778

b. Command:

No idea what this means

paste command here

No idea what this means

c. Service/unit/compose file:

No idea what this means

paste full file contents here

No idea what this means

d. My complete Caddyfile or JSON config:

3. The problem I’m having:

The page only partially loads outside my network.

4. Error messages and/or full log output:

Access log

Error Log

5. What I already tried:

proxy / 192.168.1.103:5800/ { # GitHub - JiriS97/docker-calibre-gui: Docker image for running Calibre e-book manager in docker with in-browser gui
transparent

6. Links to relevant resources:

Pull up your web console (usually F12), go to the Network tab, reload your page outside your network where the issue is, and take a screenshot.

If you see 400s or timeouts, click one and take a screenshot of the details.

1 Like

By details I am guessing you mean the headers tab.

I do see a 401 unauthorized which is odd as I am logged in with the ID and password I supplied in the Caddyfile and it accepts them and loads the part of the page.

I tried to access the page internally from another host and it does not work their either. It only seems to work (internally or externally) from the host that this docker container is on which is also where the caddy Docker container runs as well.

I have upgraded to Caddy v2 via the official and latest version of the Docker container and am seeing the same behavior.

Your browser isn’t sending the Authorization header that is necessary for HTTP Basic Auth, so Caddy receives an empty string which fails to pass the authentication causing nothing to displayed.

1 Like

I think you are saying it appears to be a bug with the browser I am using. I am using Chrome. I also tested Edge, Firefox, and Safari all with the same results.

You are running into this:

The link tag for the manifest file should become

<link rel="manifest" href="site.webmanifest" crossorigin="use-credentials">

or exclude the manifest file from needing authentication.

2 Likes

I can confirm it works if I turn off basicauth in Caddy.

Okay, but did you try what @Mohammed90 so graciously looked into for you?

I am not sure what to do with the suggestion from Mohammed90. Do I add that to my Caddyfile?

That is HTML. Try clicking the links @Mohammed90 found for you, so you can learn about what is going on, and then you will know how to solve it.

I appreciate the help. I am not a developer and did not write the apps running in the container. Looks like this is something that requires a code change and is not something that can be addressed with Caddy.

I think this can be closed now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.