How do we make custom configs?

I tried before with Mailcow and gave up, now I’m trying again with just a basic Chrismas list tracker, tried copying configs from other subfolder samples, including calibre-web which I have working, jellyfin, deluge, etc but I keep getting 502 bad gateway. The container name is declared as christmascommunity and the page should be christmas-community.

location /christmas-community {
return 301 $scheme://$host/christmas-community/;
}
location ^~ /christmas-community/ {

include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_christmascommunity christmascommunity;
rewrite /christmas-community(.*) $1 break;



proxy_pass http://$upstream_christmascommunity:8022/;


proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;


#proxy_set_header Host $http_host;
#proxy_set_header X-Scheme $scheme;
#proxy_set_header X-Script-Name /christmas-community;

}

EDIT I take it back I just tried to set up OMBI with same issue
subfolder gives 502, subdomain gives server not found.

I assume you’re using the letsencrypt container, is that container in the same docker network as your christmascommunity container? if you’re using a subdomain, is there a dns entry for christmascommunity

if christmascommunity is not a container or is not in the same docker network, you need to proxy to the ip of the system. Can you access christmascommunity by going to http://<ip of server or docker host>:8022 ?

the config sample you put looks like a subfolder, does your christmascommunity app require a base url? have you set it if it does? (the subdomain portion may be specific to ombi)

what did the subdomain attempt look like?

you can reference
https://blog.linuxserver.io/2019/04/25/letsencrypt-nginx-starter-guide/
and
https://blog.linuxserver.io/2019/07/10/troubleshooting-letsencrypt-image-port-mapping-and-forwarding/

for some additional help too.

EDIT< I’m a moron I forgot to put port forwards.

Ombi works now but this is the container, doesn’t look to need it: https://hub.docker.com/r/wingysam/christmas-community

Adding Muximux to the list of custom configs that give bad gateway. Copied from Sonarr.
Port is open, is on same net as lets encrypt, cname is in place.

server {
listen 443 ssl;
listen [::]:443 ssl;

server_name muximux.*;

include /config/nginx/ssl.conf;

client_max_body_size 0;

# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;

location / {
    # enable the next two lines for http auth
    #auth_basic "Restricted";
    #auth_basic_user_file /config/nginx/.htpasswd;

    # enable the next two lines for ldap auth
    #auth_request /auth;
    #error_page 401 =200 /login;

    include /config/nginx/proxy.conf;
    resolver 127.0.0.11 valid=30s;
    set $upstream_muximux muximux;
    proxy_pass http://$upstream_muximux:8083;
}

}

Muximux listens on port 80. Change 8083 in proxy conf to 80

Docker container - letsencrypt is using port 80.

-p 8083:80 \

Doesn’t matter. They won’t conflict as they have their own container ip.

that’s irrelevant
it’s explained in the blog article driz linked to above

My bad that part was not clicking in my brain or I read over it or something.

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