Hi Everyone,

I am trying to host my ebook collection via the "Calibre Content Server"
(i.e., calibre-server) on OpenBSD 7.5, but I am having a problem with my
/etc/httpd.conf.

My ebooks (comprising epub, mobi, and pdf files) are located in
/var/calibre/library.

I've created a dedicated user, _calibre, to run the server, and I do so
like this:

# doas -u _calibre calibre-server --port=8004 /var/calibre/library
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to
'/tmp/runtime-_calibre'
calibre server listening on 0.0.0.0:8004
OPDS feeds advertised via BonJour at: 192.168.1.78 port: 8004
_

When I do this, I can, from another computer within my network, navigate to
http://192.168.1.78:8004 and read my ebooks. So far so good.
I now want to access the same webpage from outside of the network using a
domain I've purchased; however, I keep getting the following httpd error
when I navigate to my URL:

500 Internal Server Error.


Am I missing something obvious?


Many Thanks.


/etc/httpd.conf:

### Calibre
### https://lit.mydomain.io ###
server "lit.mydomain.io" {
        listen on * tls port 443

        # enable HTTP Strict Transport Security
        hsts {
                preload
                subdomains
                max-age 15768000
        }

        tls {
                certificate "/etc/ssl/mydomain.io.fullchain.pem"
                key "/etc/ssl/private/mydomain.io.key"
        }

        location "/.well-known/acme-challenge/*" {
                root "/acme"
                request strip 2
        }

        # set logs
        log {
                access "calibre-access.log"
                error "calibre-error.log"
        }

        # set max upload size to 1G (in bytes)
        connection max request body 1048576000
        connection max requests 1000
        connection request timeout 3600
        connection timeout 3600

        # calibre access points
        location "/*" {
                fastcgi socket tcp "127.0.0.1" 8004
                # fastcgi socket tcp "192.168.1.78" 8004
        }
}

### http://lit.mydomain.io
server "lit.mydomain.io" {
        listen on * port 80

        location "/.well-known/acme-challenge/*" {
                root "/acme"
                request strip 2
        }

        location * {
                block return 302 "https://$HTTP_HOST$REQUEST_URI";
        }

}



/etc/acme-client.conf:

$ less /etc/acme-client.conf
authority letsencrypt {
        api url "https://acme-v02.api.letsencrypt.org/directory";
        account key "/etc/acme/letsencrypt-privkey.pem"
}

authority letsencrypt-staging {
        api url "https://acme-staging.api.letsencrypt.org/directory";
        account key "/etc/acme/letsencrypt-staging-privkey.pem"
}

domain mydomain.io {
        alternative names { www.mydomain.io, pub.mydomain.io,
img.mydomain.io, src.mydomain.io, tar.mydomain.io, lit.mydomain.io }
        domain key "/etc/ssl/private/mydomain.io.key"
        domain certificate "/etc/ssl/mydomain.io.crt"
        domain full chain certificate "/etc/ssl/mydomain.io.fullchain.pem"
        sign with letsencrypt
}

Reply via email to