• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

Nginx location differences

DeCysos

Phoenix Foto Service
Nginx is still a mystery to me.

Could someone explain to me what the difference between ....
[CODE highlight="1"]location ~* / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}[/CODE]
and
[CODE highlight="1"]location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}[/CODE]
consists ?

With my home server I have Plesk running as administration software and this software complains when I use location / {. It is quite complicated to use this method which is why I decided to use the following location ~* / {
Plesk complains because there is already an entry for "/".

Since I currently have no home server running without Plesk, I ask myself whether Nginx would complain if I made the change without Plesk and restart the Nginx service.

Would definitely be nice if someone could explain that to me. ;)
 
i have found it.
https://mviess.de/sysadm/nginx.php
Original said:
1. location Block mit = Vorzeichen : Wenn die URI den String exakt trifft, verarbeitet NGINX diesen Block. (Beispiel : location = /doc)
2. location Block mit keinem Vorzeichen : Wenn die URI den String exakt trifft, verarbeitet NGINX diesen Block. (Beispiel : location /doc)
3. location Block mit ^~ Vorzeichen : Wenn die URI den beginn des Strings trifft, verarbeitet NGINX diesen Block UND STOPPT DIE SUCHE. (Beispiel : location ^~ /doc oder location ^~ /(abc|xyz))
4. location Block mit ~ oder ~* Vorzeichen : Wenn die URI den String mit REGEX trifft, verarbeitet NGINX diesen Block. (Beispiel : location ~ ^/doc$ oder location ~* ^/doc$)
Zu 4. Gibt es mehrere Blöcke mit ~ oder ~*, wird der Reihenfolge in der Konfiguration nach verarbeitet.
5. location Block mit keinem Vorzeichen : Wenn die URI den beginn des Strings trifft, verarbeitet NGINX diesen Block. (Beispiel : location /doc)
Zu 5. Hier trifft der längere Treffer. Haben wir location mit /doc und /document und der Request ist /documents.html wird der /document Block verarbeitet.

1. location block with = sign: If the URI matches the string exactly, NGINX processes this block. (Example: location = /doc)
2. Location block with no sign: If the URI matches the string exactly, NGINX processes this block. (Example: location /doc)
3. location block with ^~ sign: If the URI hits the beginning of the string, NGINX processes this block AND STOPS THE SEARCH. (Example: location ^~ /doc or location ^~/(abc|xyz))
4. location block with ~ or ~* sign: If the URI hits the string with REGEX, NGINX processes this block. (Example: location ~^ /doc$ or location ~* ^ /doc$)
Re 4. If there are several blocks with ~ or ~*, the order in the configuration is processed.
5. Location block with no sign: If the URI hits the beginning of the string, NGINX processes this block. (Example: location /doc)
To 5. The longer hit hits here. If we have location with /doc and /document and the request is /documents.html the /document block is processed.
 
Back
Top