Jellyfin Forum
SOLVED: Apache + Clouflare + JellyFin; I need help setting up this. - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: SOLVED: Apache + Clouflare + JellyFin; I need help setting up this. (/t-solved-apache-clouflare-jellyfin-i-need-help-setting-up-this)



Apache + Clouflare + JellyFin; I need help setting up this. - FLKS - 2023-09-28

Hello everyone and thanks for the help.
I have a domain in cloudflare, and a host pc with jellyfin and apache.
Apache is listing on port 80 (HTTP) and 443 (HTTPS). JellyFin is listening on port 8096 (HTTP) and 8920(HTTPS).
My cloudflare domain is targeting my public ip adress that my jellyfin server is on.

With this said i need help using a subdomain to go to my normal apache page (www.domain.com) and another one to go to the jellyfin server (jelly.subdomain.com).
How do I achieve this?


RE: Apache + Clouflare + JellyFin; I need help setting up this. - TheDreadPirate - 2023-09-28

I think its as simple as setting the ServerName field to include the subdomain for the jellyfin reverse proxy listener.

Code:
ServerName jellyfin.domain.com



RE: Apache + Clouflare + JellyFin; I need help setting up this. - FLKS - 2023-09-28

Hello and thanks for the response. Where do I put that?.
In my /etc/apache2/sites-avaliable/000-default.conf I already tried adding this to the file:
<VirtualHost *:80>
ServerName jelly.domain.com
ProxyPreserveHost On
ProxyPass / http://192.168.1.100:8096
ProxyPassReverse / http://192.168.1.100:8096
</VirtualHost>


RE: Apache + Clouflare + JellyFin; I need help setting up this. - TheDreadPirate - 2023-09-28

That is the correct file. Once you add it you will need to reload apache.

Code:
systemctl reload apache2

I also run apache, but I don't use a subdomain. If that doesn't work, I will figure it out on mine.


RE: Apache + Clouflare + JellyFin; I need help setting up this. - TheDreadPirate - 2023-09-29

I have not been able to figure this out tonight. I will get back to you. Probably sometime this weekend.

There is a way, just need to figure out the syntax.


RE: Apache + Clouflare + JellyFin; I need help setting up this. - FLKS - 2023-09-29

Hello again and sorry if I waste your time, i tried adding that to the file and other things, the truth is i used various solutions without any sucess. My Machine that is hosting the site is Debian12 (if this give any revelant info).


RE: Apache + Clouflare + JellyFin; I need help setting up this. - FLKS - 2023-09-29

Hi again i found my problem. Well it was pretty simple. After 1 week i found my problem and it was on the 000-default.conf i didn't read the comment " # However, you must set it for any further virtual host explicitly.".
The fix for my problem was on 000-default.conf on VirtualHost *:80 i needed to change the ServerName from www.example.com to www.domain.com.

I hope everyone has a good day Smiling-face