Answer the question
In order to leave comments, you need to log in
How to make custom message with 404 response in nginx?
There is some config
server {
listen 443 ssl;
listen [::]:443 ssl;
...
root /var/www/symfony/web;
...
location / {
# try to serve file directly, fallback to app.php
try_files $uri /app.php$is_args$args;
if ($allowed_country = no){
return 404; # Здесь происходит ответ. Необходимо кастомное сообщение тип "Нет доступа для вашего региона"
}
...
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question