Linkace with local nginx on subdomain

Similar issue to Linkace with SSL on a subdomain of my URL however their solution is not working.

Getting 502 Bad Gateway errors when trying to access Linkace via https://linkace.domain.com.

I have a local nginx installation used as a reverse proxy for other non-docker applications.

This is the first Docker app I’ve tried to install, so it’s also using a fresh install of Docker (v20.10.12).

I adjusted the docker-compose.yml nginx config to:

    ports:
      - "0.0.0.0:9011:8080"

And then ran the installation as per the guide, also adjusting the .env file as per the guide. No errors were reported.

After I set up my local nginx server block for Linkace like this:

server {
        server_name     linkace.domain.com

        listen          443 ssl http2;
        listen          [::]:443 ssl http2;

        ssl_certificate                 /etc/letsencrypt/live/domain.com/fullchain.pem;
        ssl_certificate_key             /etc/letsencrypt/live/domain.com/privkey.pem;
        ssl_dhparam                     /etc/letsencrypt/ssl-dhparams.pem;
        ssl_trusted_certificate         /etc/letsencrypt/live/xxx/chain.pem;

        location / {
                proxy_pass              http://localhost:9011;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header X-Forwarded-Proto $scheme; 
                proxy_set_header Host $host; 
        }
}

At this point I’m unsure what to try next. Some other things I have attempted:

  • curl the container’s local ipaddress:port gives connection refused
  • curl localhost:port gives connection refused
  • pinging the containers local IP gives fine response…

Any help would be greatly appreciated…

Installed via: Advanced setup
OS: Ubuntu

I checked the status using docker ps and saw the nginx container was in a constant restart state. I then checked the log and it looks like an issue reading linkace.conf which is a directory?

nginx 11:10:03.61 INFO  ==> ** Starting NGINX **
2021/12/23 11:10:03 [crit] 1#1: pread() "/opt/bitnami/nginx/conf/server_blocks/linkace.conf" failed (21: Is a directory)
nginx: [crit] pread() "/opt/bitnami/nginx/conf/server_blocks/linkace.conf" failed (21: Is a directory)

I have found the solution.

For some reason ngxin.conf turned into a directory.

I delete it, and curl’d a new one from the Github repo and restarted the nginx container and everything worked. Very odd.

1 Like