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
Die Implementierung eines benutzerdefinierten Kar...
Vorwort: Ich habe vor langer Zeit gehört, dass My...
Codeeffekte werden häufig in unterschiedlichen Br...
Code-Implementierung: Code kopieren Der Code laut...
Problembeschreibung: Beim Ausführen eines Befehls...
mysql kopiert die Dateien im Datenverzeichnis, um...
Inhaltsverzeichnis 1. Was ist Blockbereich? 2. Wa...
Wichtige Daten müssen gesichert werden, und zwar ...
Ich bin erst vor kurzem mit countly in Kontakt ge...
In diesem Artikel wird die Verwendung von Docker ...
In einem Cluster mit Master-Slave-Replikationsmod...
<br /> Der Entwurf einer persönlichen Schrei...
Da Uniapp nicht über eine autorisierte DingTalk-A...
Ich bin auf den MySQL-FEHLER 1045 gestoßen und ha...
MySQL-Basisdatentypen Übersicht über gängige MySQ...