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
In diesem Artikel wird hauptsächlich die Methode ...
Inhaltsverzeichnis Einführung in den Samba-Server...
Vielleicht habe ich angefangen, falsch zu denken,...
Hier stellen wir nur die relativ einfache Install...
Originaldaten und Zieldaten SQL-Anweisungen imple...
Inhaltsverzeichnis Rendern Installieren Code-Impl...
Lassen Sie mich zunächst einen Blick auf den Beis...
Binärprotokoll der Hauptbibliothek: # bei 2420 #1...
1. Erstellen Sie ein Konfigurationsdateiverzeichn...
Inhaltsverzeichnis Einführung Erste Schritte Eine...
Inhaltsverzeichnis Master-Master-Synchronisierung...
Inhaltsverzeichnis 1. Anweisungen zum Starten und...
Sie können die Containerprotokolle über den Befeh...
In diesem Artikel wird der spezifische JavaScript...
Gehen Sie im Hive-Installationsverzeichnis in das...