veranschaulichen: Stamm und Alias im Standort
Die URI des Proxy-Passes am Standort Wenn die Proxy-Pass-URL keine URI enthält
Wenn die Proxy-Pass-URL eine URI hat, wird die passende URI abgeschnitten Beispiele Root im Standort root@pts/1 $ ls -ld /data/web/lctest*|awk '{print $NF}' /data/web/lctest /data/web/lctest2 /data/web/lctest3 /data/web/lctest4 Standort /lctest { Stammverzeichnis /Daten/Web/; } Standort /lctest2/ { Stammverzeichnis /Daten/Web/; } Standort /lctest3 { Stammverzeichnis /Daten/Web; } Standort /lctest4/ { Stammverzeichnis /Daten/Web; } Die Ergebnisse des Curl-Tests lauten wie folgt Hinweis: Wenn Sie bei der Eingabe im Browser am Ende kein / hinzufügen, wird es automatisch hinzugefügt, curl jedoch nicht root@pts/1 $ curl http://tapi.xxxx.com/lctest/ Hallo Welt root@pts/1 $ curl http://tapi.xxxx.com/lctest2/ Hallo Welt 2 root@pts/1 $ curl http://tapi.xxxx.com/lctest3/ 3 Hallo Welt root@pts/1 $ curl http://tapi.xxxx.com/lctest4/ Hallo Welt 4 Standortalias Standort /lctest5 { Alias /Daten/Web/; } Standort /lctest6/ { Alias /Daten/Web/; } Standort /lctest7 { Alias /Daten/Web; } ## 403 /data/web verboten Standort /lctest8/ { Alias /Daten/Web; } Die Ergebnisse des Curl-Tests lauten wie folgt curl 'http://tapi.kaishustory.com/lctest5/' curl 'http://tapi.kaishustory.com/lctest6/' curl 'http://tapi.kaishustory.com/lctest7/' Die Ergebnisse sind alle /data/web/index.html Ausgabe root@pts/1 $ curl 'http://tapi.kaishustory.com/lctest8/' <html> <head><title>403 Verboten</title></head> <body bgcolor="weiß"> <center><h1>403 Verboten</h1></center> <hr><center>nginx</center> </body> </html> Standort-Proxy-Passwort #--------proxy_pass-Konfiguration--------------------- Standort /t1/ { Proxy-Passwort http://Servers; } #Normal, nicht gekürzt Standort /t2/ { Proxy-Passwort http://Servers/; } #Normal, Kürzung Standort /t3 { Proxy-Passwort http://Servers; } #Normal, nicht gekürzt Standort /t4 { Proxy-Passwort http://Servers/; } #Normal, Kürzung Standort /t5/ { Proxy-Passwort http://Servers/Test/; } #Normal, Kürzung Standort /t6/ { Proxy-Passwort http://Servers/Test; } #Fehlt „/“, Kürzung Standort /t7 { Proxy-Passwort http://Servers/Test/; } #Enthält „//“, Kürzung Standort /t8 { Proxy-Passwort http://Servers/Test; } #Normal, Kürzung Testskripte für i in $(seq 8) Tun url=http://tapi.xxxx.com/t$i/doc/index.html echo "----------$url-----------" Curl-URL Erledigt Testergebnisse ----------http://tapi.xxxx.com/t1/doc/index.html------------ /t1/doc/index.html ----------http://tapi.xxxx.com/t2/doc/index.html------------ /doc/index.html ----------http://tapi.xxxx.com/t3/doc/index.html------------ /t3/doc/index.html ----------http://tapi.xxxx.com/t4/doc/index.html------------ /doc/index.html ----------http://tapi.xxxx.com/t5/doc/index.html------------ /test/doc/index.html ----------http://tapi.xxxx.com/t6/doc/index.html------------ /testdoc/index.html ----------http://tapi.xxxx.com/t7/doc/index.html------------ /test//doc/index.html ----------http://tapi.xxxx.com/t8/doc/index.html------------ /test/doc/index.html Das Obige ist der vollständige Inhalt dieses Artikels. Ich hoffe, er wird für jedermanns Studium hilfreich sein. Ich hoffe auch, dass jeder 123WORDPRESS.COM unterstützen wird. Das könnte Sie auch interessieren:
|
<<: Tutorial zur Installation und Konfiguration von MySQL Workbench unter CentOS
>>: Beispiel-Tutorial zur JavaScript-Typerkennungsmethode
Inhaltsverzeichnis 1. Einführung in die Linux-Sys...
Wenn Sie sich remote bei MySQL anmelden, gelten f...
Inhaltsverzeichnis brauchen: Ideen: Lektion: Teil...
In diesem Artikelbeispiel wird der spezifische Co...
Ich habe vor Kurzem eine visuelle Operationsplatt...
Vorwort Sie erhalten möglicherweise häufig Warn-E...
Inhaltsverzeichnis 1. Einführung in integrierte O...
In unserer täglichen Arbeit kommen wir oft mit Da...
Inhaltsverzeichnis 1. Implementierungsprozess des...
Vorwort: In manchen Anwendungsszenarien stoßen wi...
Die virtuelle Maschine wird auf dem Hostcomputer ...
MySQL ist ein kleines relationales Open-Source-Da...
In diesem Tutorial erfahren Sie alles über die In...
Inhaltsverzeichnis Konfigurieren Sie node.js+nvm+...
Zwei Möglichkeiten zum Navigieren auf der Seite D...