Эсли uri является domaindotcom/me тогда fallback uri будет использовать. Т.е,

энжинкс обработывает как статичный файл, да? Но это не так работает. php-fpm обработывает Этот файл. Как это понять? Я вообще не понял... Просто мозг упал 😄

10 ответов

16 просмотров

Что именно не понятно? Есть такой файл - отдаём как статику Нет такого файла - запрос обрабатывает index.php

Sanjarbek-Sobirjonov Автор вопроса
Johann
Что именно не понятно? Есть такой файл - отдаём ка...

Да это понятно. Но запрос обрабатывает индекс.пхп через fastcgi т.е php-fpm а не как статичный файл

Ну если бы это было не так, ты бы получил в виде ответа исходный код этого index.php В чём вопрос?

Sanjarbek-Sobirjonov Автор вопроса
Johann
Ну если бы это было не так, ты бы получил в виде о...

Да, там есть вопрос. Я выделил локация ~ \.php$ для пхп файлов что нужно fastcgi. А на try_files нет fastcgi. Как nginx обрабатывает фаллбек ури even if the fastcgi is not defined inside that location context?

Sanjarbek Sobirjonov
Да, там есть вопрос. Я выделил локация ~ \.php$ дл...

Machine translation? The last try_files parameter is completely different from the others. When try_files fallback is specified as URI, nginx will search most suitable location to handle that URI from the beginning (and even more, the SERVER_REWRITE request processing phase will be fired again). Every other try_files parameter is treated as a filename relative to root, and that file, if exists, will be processed using that location content handler.

Sanjarbek-Sobirjonov Автор вопроса
Johann
Machine translation? The last try_files parameter...

did you mean that the fallback uri index.php?$query_string is treated as filename relative to the root, yeah?

It is treated as a completely new URI to evaluate from the beginning. The key sentence was The last try_files parameter is completely different from the others. You can't do something like try_files $uri $uri.php $uri/ =404; The uri.php, even if being an existed file, will be processed according to the location content handler (you call it "location context", ok). But when the very last try_files parameter is an URI pointing to the PHP file, that URI will be processed as a new URI, and another location will be chosen to handle it. Consider it as a jump to another location.

Sanjarbek-Sobirjonov Автор вопроса
Johann
It is treated as a completely new URI to evaluate ...

Did you mean by "it is treated as a completely new URI" an rewriting? try_files behaves as rewriter if it has the third parameter? It sets the third parameter's value to the current URI?

Sanjarbek Sobirjonov
Did you mean by "it is treated as a completely new...

Not the third. The last one. It can be second, third, fourth and so on. Did you try to read the documentation? And it isn't work exactly as a rewrite ... last directive. Rewrite made by the try_files directive last parameter (when it is a new URI and not the named location ID) will start from the HTTP_SERVER_REWRITE request processing phase in opposite to the rewrite ... last, which will trigger the HTTP_FIND_CONFIG phase (request processing phases description can be found here).

Sanjarbek-Sobirjonov Автор вопроса
Johann
Not the third. The last one. It can be second, thi...

теперь понятно спасибо большое

Похожие вопросы

Обсуждают сегодня

Может кто подсказать какие требования к изображениям для обучения Yolo v8? Как то разрешение, размер выделяемого обьекта в пикселях, оптимальное кол-во изображений. А то я пыт...
Владислав😎
16
Только сейчас дошли руки до Orange pi 5. Это нормально что на нем YOLOv5s выдает 1 кадр раз в 2-3 секунды на CPU? Это без оптимизаций и прочих настроек, просто голый запуск че...
Denis
17
Доброе утро. Подскажите, если если 4 корутины, внутри которых VideoCapture, то будут ли они работать асинхронно? Т.к. нагуглил, что Videocapture в моменте может быть открыт то...
Alexander👨‍💻
19
Всем привет! подскажите пожалуйста как можно увеличить качество фото?
Evgeniy
19
А. То есть задача такая, что тип вы обучаете на разных данных модели. Получаете пачку моделей обученных на частных данных и задача стоит в том, чтобы все эти модели объединит...
Anton 『被遗忘的社会』
7
Hello everyone, ребят, к какому уровню сложности может относиться задачка по отделению облаков от неба для видео? (от 1 до 10,) *в условиях смены времени суток *при неизменно...
Merge
16
Я пожалуй ещё раз брошу клич: кто-нибудь хочет в рабство в ОЭЗ Алабугу на позицию инженера CV? Работы много, задачи сложные, ЗП высокая. Я передам контакт напрямую в HR.
Maxim 👀 Osminin #Slowpoke3D
13
Можно ли как то привязать видеопоток(mss, cv2 capture и тд) к одному окну? Допустим я включил видеопоток и он привязан только к одному окну в фоне. Чтобы можно было работать и...
TrL Yash?
4
Hi, has anyone worked on this dataset by chance? https://www.kaggle.com/datasets/alexteboul/diabetes-health-indicators-dataset There are 3 files inside this. I'm planning to...
Ht
1
Нужно ли ресайзить или кропать изображения, перед тем как скормить их yolov5?
Phantom
5
Карта сайта