Apache2 Weiterleitung zu Owncloud nicht korrekt

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
TheDevice
Beiträge: 3
Registriert: 16.10.2017 21:46:52

Apache2 Weiterleitung zu Owncloud nicht korrekt

Beitrag von TheDevice » 16.10.2017 22:02:01

Hallo @ all,

ich habe daheim einen kleinen Homeserver stehen, auf diesem läuft ein FreeNAS mit Owncloud als Plugin.
Da Owncloud ein gesichertes Jail ist, habe ich noch einen Debian 9 Stretch Webserver aufgesetzt um dort einfacher mit Cerbot mir SSL Zertifikate für meine Domäne holen zu können. Bin leider auch nicht so mit der Struktur sowie den Befehlen von FreeBSD vertraut.

Zu meinem Problem:

Webserver läuft, dort hab ich mit dem python-cerbot-apache Packet auch ohne Probleme mein SSL Zertifikat erhalten und Certbot hat mit "--apache" auch die korrekten Konfigurationsdateien angepasst.
Test ergibt, dass der Server mit der Apache2 Testseite von außen erreichbar und mit SSL gesichert ist.

Nun wollte ich auf dem Webserver mit mod_proxy eine Weiterleitung auf das Owncloud Plugin erreichen.
Dazu habe ich mod_proxy, proxy_html, usw installiert. Danach in der 000-default.conf und der 000-default-le-ssl.conf unter den dortigen VirtualHosts folgendes eingetragen:
...
ProxyPreserveHost On
ProxyPass / http://192.168.178.201:80/
ProxyPassReverse / http://192.168.178.201:80/
...

und in der ssl.conf:

...
ProxyPreserveHost On
ProxyPass / http://192.168.178.201:443/
ProxyPassReverse / http://192.168.178.201:443/
...

Geb ich nun in meinem Webbrowser die IP des Webservers ein, werde ich auf die Loginseite von Owncloud geleitet, allerdings erscheint hier eine Warnung zwecks nicht Vertrauenswürdigem Zugriff und ob ich diese Domain zu einer Vertrauenswürdigen machen möchte. -> Intern für mich nicht so schlimm

Leider ist ein Zugriff von außen über mydomain.de nicht möglich, da mir dort ein Internal Server Error angezeigt wird. Hat jemand einen Lösungsvorschlag für mich? Bei Bedarf kann ich noch Konfigurationseinträge posten.

jeff84
Beiträge: 324
Registriert: 15.07.2009 13:32:36

Re: Apache2 Weiterleitung zu Owncloud nicht korrekt

Beitrag von jeff84 » 17.10.2017 11:46:17

Was enorm hilfreich sein könnte, sind die Einträge in der access.log und error.log vom Apache. Und vielleicht noch die Einträge im data/owncloud.log.

TheDevice
Beiträge: 3
Registriert: 16.10.2017 21:46:52

Re: Apache2 Weiterleitung zu Owncloud nicht korrekt

Beitrag von TheDevice » 17.10.2017 17:01:06

Das owncloud.log ist leer.

Von den anderen beiden hab ich Auszüge. Mir ist noch aufgefallen, solange der ProxyPass Eintrag nur in der 000-default.conf steht komm ich im LAN ohne Probleme drauf, nur von extern nicht, dort krieg ich die Apache2 Standardseite. Also hab ich es in der ssl.conf ebenfalls eingetragen, dann krieg ich im LAN aber auch den Internal Server Error.

Error.log:
[Tue Oct 17 16:27:36.904383 2017] [mpm_event:notice] [pid 3103:tid 139871670281408] AH00489: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations
[Tue Oct 17 16:27:36.904597 2017] [core:notice] [pid 3103:tid 139871670281408] AH00094: Command line: '/usr/sbin/apache2'
[Tue Oct 17 16:30:07.764823 2017] [mpm_event:notice] [pid 3103:tid 139871670281408] AH00491: caught SIGTERM, shutting down
[Tue Oct 17 16:30:08.040182 2017] [mpm_event:notice] [pid 3182:tid 140474379052224] AH00489: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations
[Tue Oct 17 16:30:08.040400 2017] [core:notice] [pid 3182:tid 140474379052224] AH00094: Command line: '/usr/sbin/apache2'
[Tue Oct 17 16:34:42.618746 2017] [mpm_event:notice] [pid 3182:tid 140474379052224] AH00491: caught SIGTERM, shutting down
[Tue Oct 17 16:34:42.857152 2017] [mpm_event:notice] [pid 3262:tid 140015332316352] AH00489: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations
[Tue Oct 17 16:34:42.857375 2017] [core:notice] [pid 3262:tid 140015332316352] AH00094: Command line: '/usr/sbin/apache2'
[Tue Oct 17 16:34:47.832516 2017] [ssl:error] [pid 3265:tid 140015112427264] [remote 192.168.178.201:443] AH01961: SSL Proxy requested for mydomain.de:443 but not enabled [Hint: SSLProxyEngine]
[Tue Oct 17 16:34:47.832701 2017] [proxy:error] [pid 3265:tid 140015112427264] AH00961: HTTPS: failed to enable ssl support for 192.168.178.201:443 (192.168.178.201)
[Tue Oct 17 16:34:51.800976 2017] [ssl:error] [pid 3265:tid 140015095641856] [remote 192.168.178.201:443] AH01961: SSL Proxy requested for mydomain.de:443 but not enabled [Hint: SSLProxyEngine]
[Tue Oct 17 16:34:51.801025 2017] [proxy:error] [pid 3265:tid 140015095641856] AH00961: HTTPS: failed to enable ssl support for 192.168.178.201:443 (192.168.178.201)
[Tue Oct 17 16:34:58.344442 2017] [ssl:error] [pid 3264:tid 140015167178496] [remote 192.168.178.201:443] AH01961: SSL Proxy requested for mydomain.de:443 but not enabled [Hint: SSLProxyEngine]
[Tue Oct 17 16:34:58.344576 2017] [proxy:error] [pid 3264:tid 140015167178496] AH00961: HTTPS: failed to enable ssl support for 192.168.178.201:443 (192.168.178.201)
Access.log
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/fonts/OpenSans-Light.woff HTTP/1.1" 200 63365 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/fonts/OpenSans-Regular.woff HTTP/1.1" 200 21065 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/fonts/OpenSans-Semibold.woff HTTP/1.1" 200 70410 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/img/logo-icon.svg HTTP/1.1" 200 3419 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/img/breadcrumb.svg HTTP/1.1" 200 963 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/img/background.jpg HTTP/1.1" 200 134046 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/img/loading-dark.gif HTTP/1.1" 200 2821 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/img/actions/confirm.svg HTTP/1.1" 200 878 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:19 +0200] "GET /core/img/actions/checkbox-white.svg HTTP/1.1" 200 939 "http://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
- - [17/Oct/2017:16:30:26 +0200] "GET / HTTP/1.1" 200 6656 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:26 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 200 6098 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:27 +0200] "GET /favicon.ico HTTP/1.1" 404 531 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:27 +0200] "GET /favicon.ico HTTP/1.1" 404 531 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:28 +0200] "GET / HTTP/1.1" 200 3466 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:28 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 210 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:29 +0200] "GET / HTTP/1.1" 200 3466 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:29 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 210 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:29 +0200] "GET / HTTP/1.1" 200 3466 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 210 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET / HTTP/1.1" 200 3466 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 210 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET / HTTP/1.1" 200 3466 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET / HTTP/1.1" 200 3619 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET / HTTP/1.1" 200 3619 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 210 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET / HTTP/1.1" 200 3466 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 210 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:30 +0200] "GET / HTTP/1.1" 200 3619 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
- - [17/Oct/2017:16:30:31 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 304 210 "https://mydomain.de/" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0"
192.168.178.25 - - [17/Oct/2017:16:30:44 +0200] "GET /login HTTP/1.1" 404 3693 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:30:44 +0200] "GET /favicon.ico HTTP/1.1" 404 533 "https://192.168.178.210/login" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:34:47 +0200] "GET /login HTTP/1.1" 500 3997 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:34:51 +0200] "GET /login HTTP/1.1" 500 3997 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
192.168.178.25 - - [17/Oct/2017:16:34:58 +0200] "GET / HTTP/1.1" 500 3997 "-" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
Wenn ich das jetzt richtig verstehe, ist SSLProxyEngine nicht aktiviert. Allerdings klappt zur Standard Apache2 Seite ja SSL, da es der certbot Client bei der Installation konfiguriert hat?
Vielen Dank für die Hilfe!

TheDevice
Beiträge: 3
Registriert: 16.10.2017 21:46:52

Re: Apache2 Weiterleitung zu Owncloud nicht korrekt

Beitrag von TheDevice » 17.10.2017 22:00:29

So habe meinen Fehler gefunden.

Damit, falls mal jemand ein Problem in die Richtung hat, es nachlesen kann:

Ich habe in der .conf für http und https jeweils die Weiterleitung nur auf Port 80 eingetragen.
ProxyPreserveHost On

ProxyPass / http://lokale-ip:80/
ProxyPassReverse / http://lokale-ip:80/
Zuvor hatte ich eine Weiterleitung auf :443 und eine auf :80, das hat hier wohl zu einem Konflikt geführt.

Antworten