CyferShepard / Jellystat

Jellystat is a free and open source Statistics App for Jellyfin
MIT License
1.01k stars 32 forks source link

proxy reverse nginx subfolder or subdomain #167

Open caio1007 opened 8 months ago

caio1007 commented 8 months ago

Hello, is there any method or project for future implementation of reverse proxy nginx subdomain (jellystat.mydomain.com) or reverse proxy nginx subfolder? (mydomain.com/jellystat). thanks.

Pesoen commented 7 months ago

i currently use the NGINX Proxy Manager to have jellystat as a subdomain of my actual domain(jellystat.domain.extension) and have no issues with it.

nitschis commented 7 months ago

i currently use the NGINX Proxy Manager to have jellystat as a subdomain of my actual domain(jellystat.domain.extension) and have no issues with it.

Can you post your config?

Pesoen commented 7 months ago

i currently use the NGINX Proxy Manager to have jellystat as a subdomain of my actual domain(jellystat.domain.extension) and have no issues with it.

Can you post your config?

i am using docker to host nginx, and i use this image: jc21/nginx-proxy-manager

it has an easy to use GUI, and i massively prefer using GUI's whenever possible.

but this is what i have in the GUI.

image

image

the advanced and custom locations is not used.

all my pages are setup like this, with small changes, such as the subdomain being different, and the forward hostname and port being changed pr program.

if i had jellyseerr on one of my other raspberry pis, instead of hostname, i would use the ip of the pi, but since jellyseerr and nginx proxy manager is on the same pi(same network in docker) i just use hostname, and dont forward the port out of docker.

nitschis commented 7 months ago

Thank you for your post. Unfortunately, that does not really help, as I use config files and don't see anything out of the ordinary in your pictures. I hope the maintainer can look into this.

Pesoen commented 7 months ago

Thank you for your post. Unfortunately, that does not really help, as I use config files and don't see anything out of the ordinary in your pictures. I hope the maintainer can look into this.

managed to dig around, and found the file. i have removed a ton of blank spaces, and removed the actual domain, but this is the file i have that handles my reverse proxy.

map $scheme $hsts_header { https "max-age=63072000; preload"; } server { set $forward_scheme http; set $server "192.168.0.68"; set $port 8096; listen 80; listen [::]:80; listen 443 ssl; listen [::]:443 ssl; server_name jellystat.DOMAIN.EXTENSION;

Let's Encrypt SSL

include conf.d/include/letsencrypt-acme-challenge.conf; include conf.d/include/ssl-ciphers.conf; ssl_certificate /etc/letsencrypt/live/npm-38/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/npm-38/privkey.pem;

Block Exploits

include conf.d/include/block-exploits.conf;

Force SSL

include conf.d/include/force-ssl.conf;

access_log /data/logs/proxy-host-59_access.log proxy; error_log /data/logs/proxy-host-59_error.log warn; location / {

Proxy!

include conf.d/include/proxy.conf;

}

Custom

include /data/nginx/custom/server_proxy[.]conf; }

if you need anything else, i can now find it :) EDIT: the large text is comments.

nitschis commented 6 months ago

Thank you for your reply. I thought that it might have something to do with you using a subdomain instead of a directory. However, right after the user creation, it displays "Error: Unable to connect to Jellystat Backend".

Which is more than I ever got with a subdirectory.