Answer the question
In order to leave comments, you need to log in
Debug config for Nginx, need help implementing an idea?
Greetings.
This time, I need help regarding the Nginx config in which to set the Debug option.
Details:
While working with the site, sometimes I need to quickly switch to debug mode to solve a particular situation. I had an idea to do this with a cookie called debug_mode. When the cookie is activated, my script goes into debug mode, showing me what I need to know to debug.
From the Nginx side, I need the following:
if (isset($COOKIE['debug_mode'])) {
## Выключить Gzip для всех типов контента
gzip tmp_off;
## Выключить кеширование CSS, JS, HTML
cache tmp_off
## Принудительно сбросить кеш в браузере ( послать заголовки )
header "Cache: A nu bistro reset";
## Подробный error.debug.log
error_log /var/log/nginx/$DOMAIN.error.debug.log;
}
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