ubuntuusers.de

Reverse Proxy Apache2 Ubunt 24.04 und Jellyfin

Status: Ungelöst | Ubuntu-Version: Ubuntu 24.04 (Noble Numbat)
Antworten |

mefhome

Anmeldungsdatum:
18. Oktober 2024

Beiträge: Zähle...

Guten Tag Liebe Community,

ich versuche schon seit mehreren Tagen einen Reverse Proxy in betrieb zu nehmen, leider ohne Erfolg.

System = Ubuntu 24.04

Webserver = Apache2

Auf dem System läuft Jellyfin auf Port 8096.

Ich möchte den Server gerne von außen (Internet) erreichbar machen. Das ganze funktioniert auch schon aber mir wird immer die Standardseite von Apache2 angezeigt.

Was mache ich falsch!?!?!?


Die angepasste Config sieht wie folgt aus:

<VirtualHost *:80>
 ServerName media.hwdomain.io
# Comment to prevent HTTP to HTTPS redirect
Redirect permanent / https://media.hwdomain.io/

ErrorLog /var/log/apache2/media.hwdomain.io-error.log
CustomLog /var/log/apache2/media.hwdomain.io-access.log combined
</VirtualHost>

# If you are not using an SSL certificate, replace the 'redirect'
# line above with all lines below starting with 'Proxy'
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName media.hwdomain.io
# This folder exists just for certbot(You may have to create it, chown and chmod it to give apache permission to read it)
DocumentRoot /var/www/html/jellyfin/public_html

ProxyPreserveHost On

# Letsencrypt's certbot will place a file in this folder when updating/verifying certs
# This line will tell Apache to not to use the proxy for this folder.
ProxyPass "/.well-known/" "!"

# Tell Jellyfin to forward that requests came from TLS connections
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"

ProxyPass "/socket" "ws://192.168.5.30:8096/socket"
ProxyPassReverse "/socket" "ws://192.168.5.30:8096/socket"

ProxyPass "/" "http://192.168.5.30:8096/"
ProxyPassReverse "/" "http://192.168.5.30:8096/"

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/media.hwdomain.io/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/media.hwdomain.io/privkey.pem
Protocols h2 http/1.1

# Enable only strong encryption ciphers and prefer versions with Forward Secrecy
SSLCipherSuite HIGH:RC4-SHA:AES128-SHA:!aNULL:!MD5
SSLHonorCipherOrder on

# Disable insecure SSL and TLS versions
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

ErrorLog /var/log/apache2/media.hwdomain.io-error.log
CustomLog /var/log/apache2/media.hwdomain.io-access.log combined
</VirtualHost>
</IfModule>

Wenn ich die Anfrage mit sudo systemctl status apache2 mache kommt auch das alles Läuft

● apache2.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-10-18 07:57:57 UTC; 8s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 22468 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 22471 (apache2)
      Tasks: 105 (limit: 9335)
     Memory: 10.2M (peak: 11.0M)
        CPU: 92ms
     CGroup: /system.slice/apache2.service
             ├─22471 /usr/sbin/apache2 -k start
             ├─22473 /usr/sbin/apache2 -k start
             └─22474 /usr/sbin/apache2 -k start

Das ganze habt ich von dieser Anleitung aus erstellt: https://www.howtoforge.de/anleitung/so-installierst-du-jellyfin-media-server-unter-ubuntu-22-04/

Vielen Dank schon mal.

Grüße Michi

Bearbeitet von Thomas_Do:

Bitte verwende in Zukunft Codeblöcke, um die Übersicht im Forum zu verbessern!

Bearbeitet von Thomas_Do:

Forensyntax korrigiert.

Akedia

Anmeldungsdatum:
3. Januar 2018

Beiträge: 92

Hallo Michi,

schau mit

 sudo apachectl -M 

ob die Module aus dem a2enmod Befehl geladen sind und schau in den

sudo less /var/log/apache2/media.hwdomain.io-error.log
sudo less /var/log/apache2/media.hwdomain.io-access.log

was darin gemeldet wird.

mefhome

(Themenstarter)

Anmeldungsdatum:
18. Oktober 2024

Beiträge: 3

Hallo Akedia,

vielen Dank für deine schnelle Rückmeldung folgden info bekomme ich wenn ich den Befehl aufrufe::

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 headers_module (shared)
 mime_module (shared)
 mpm_event_module (shared)
 negotiation_module (shared)
 proxy_module (shared)
 proxy_http_module (shared)
 proxy_wstunnel_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)

Fehler AH00558 konnte ich bereits erledigen: in der

sudo nano /etc/httpd/conf/httpd.conf

bei den beiden anderen Befehlen kommt:

No such file or directory

Akedia

Anmeldungsdatum:
3. Januar 2018

Beiträge: 92

Ausgaben bitte per cut&paste von Prompt zu Prompt in einen Codeblock, das sieht dann ungefähr so aus:

Prompt:~$ Befehl
Ausgabe
Prompt:~$

Soweit ich sehe, fehlen remoteip und http2, da müssten eigentlich beim Einrichten schon Fehlermeldungen gekommen sein:

sudo a2enmod remoteip
sudo a2enmod http2
sudo systemctl restart apache2

und

sudo ls -ltr /var/log/apache2/

Bitte auch noch die Ausgaben von

sudo less /var/log/apache2/media.hwdomain.io-error.log
sudo less /var/log/apache2/media.hwdomain.io-access.log

Wenn die Dateien nicht existieren: hast Du die Site "angeschaltet"?

sudo a2ensite jellyfin
sudo systemctl restart apache2

mefhome

(Themenstarter)

Anmeldungsdatum:
18. Oktober 2024

Beiträge: 3

Hallo Akedia,

die Befehle habe ich angewandt, leider keine Verbesserung.

sudo a2enmod remoteip
sudo a2enmod http2
sudo systemctl restart apache2

mit

sudo ls -ltr /var/log/apache2/

ist folgendes Ergebnis:

total 28
-rw-r----- 1 root adm     0 Okt 16 16:26 other_vhosts_access.log
-rw-r----- 1 root adm  1119 Okt 17 01:53 access.log.2.gz
-rw-r----- 1 root adm   838 Okt 18 09:06 error.log.2.gz
-rw-r--r-- 1 root root    0 Okt 18 11:58 jellyfin_error.log
-rw-r--r-- 1 root root    0 Okt 18 11:58 jellyfin_access.log
-rw-r--r-- 1 root root    0 Okt 18 12:43 media.meinedomain.de-error.log
-rw-r--r-- 1 root root    0 Okt 18 12:43 media.meindomain.de-access.log
-rw-r----- 1 root adm  4549 Okt 18 20:06 access.log.1
-rw-r----- 1 root adm  3845 Okt 19 00:00 error.log.1
-rw-r----- 1 root adm   723 Okt 19 10:20 error.log
-rw-r----- 1 root adm   579 Okt 19 10:20 access.log

Domiannamen habe ich abgeändert.

Ja die Seite ist angeschaltet siehe:

Site jellyfin already enabled

Antworten |