Simone: Alias Nginx-Proxy vs. Apache2 Alias

Beitrag lesen

Hi Tom,

ist vielleicht auch etwas "tricky" von mir ausgedrückt.

Ich versuche es nochmal besser:

Der Alias sagt ja z.B.: das sich das Bild image2.gif nicht im Stammverzeichnis befindet sondern an einer anderen Stelle auf dem Server und von dort geladen werden soll. Diese Regel wird in der /etc/apache2/mods-available/alias.conf formuliert.

Alias /icons/ "/usr/share/apache2/icons/"

Leider kennt der Proxy diese Regel nicht ... und erzeugt somit eine 404 für das Bild image2.gif

es sei denn ich formuliere einen Alias in der Nginx-Proxy-conf

			#Alias /icons/ "/usr/share/apache2/icons/"

			location ~ ^/icons/.* 
			{
				root /usr/share/apache2/;
			}

durch diese Regel wird das entsprechende Bild angesprochen

2019/12/11 15:31:59 [debug] 1791#1791: *486 http filename: "/usr/share/apache2/icons/image2.gif"

Ziel sollte sein das der mods-available Alias dem Nginx-Proxy den korrekten Bild-Path weitergibt.

Mir ist nicht bekannt ob das überhaupt möglich ist.

2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Host: webserver.test"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Connection: keep-alive"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Cache-Control: max-age=0"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Upgrade-Insecure-Requests: 1"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Referer: http://webserver.test/img/"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Accept-Encoding: gzip, deflate"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Cookie: io=w-quB5IH0D_WiLSaAAAC"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "If-None-Match: "419fa618-135""
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "If-Modified-Since: Sat, 20 Nov 2004 20:16:24 GMT"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http header done
2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 0
2019/12/11 15:32:39 [debug] 1791#1791: *486 rewrite phase: 1
2019/12/11 15:32:39 [debug] 1791#1791: *486 http script var
2019/12/11 15:32:39 [debug] 1791#1791: *486 http script var: "GET"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http script value: "OPTIONS"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http script equal
2019/12/11 15:32:39 [debug] 1791#1791: *486 http script equal: no
2019/12/11 15:32:39 [debug] 1791#1791: *486 http script if
2019/12/11 15:32:39 [debug] 1791#1791: *486 http script if: false
2019/12/11 15:32:39 [debug] 1791#1791: *486 test location: "/"
2019/12/11 15:32:39 [debug] 1791#1791: *486 test location: ~ "^/icons/.*"
2019/12/11 15:32:39 [debug] 1791#1791: *486 using configuration "^/icons/.*"
2019/12/11 15:32:39 [debug] 1791#1791: *486 http cl:-1 max:1048576
2019/12/11 15:32:39 [debug] 1791#1791: *486 rewrite phase: 3
2019/12/11 15:32:39 [debug] 1791#1791: *486 post rewrite phase: 4
2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 5
2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 6
2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 7
2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 8
2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 9
2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 10
2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 11
2019/12/11 15:32:39 [debug] 1791#1791: *486 post access phase: 12
2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 13
2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 14
2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 15
2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 16
2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 17
2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 18
2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 19
2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 20
2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 21
2019/12/11 15:32:39 [debug] 1791#1791: *486 http filename: "/usr/share/apache2/icons/image2.gif"
2019/12/11 15:32:39 [debug] 1791#1791: *486 add cleanup: 00005577ED489D50
2019/12/11 15:32:39 [debug] 1791#1791: *486 http static fd: 14
2019/12/11 15:32:39 [debug] 1791#1791: *486 http set discard body
2019/12/11 15:32:39 [debug] 1791#1791: *486 http ims:1100981784 lm:1100981784
2019/12/11 15:32:39 [debug] 1791#1791: *486 http im:""419fa618-135"" etag:"419fa618-135"