On supprime les logs nginx dans la console
This commit is contained in:
parent
89092a1c28
commit
bfcc23c133
@ -8,6 +8,9 @@ http {
|
|||||||
gzip on;
|
gzip on;
|
||||||
gzip_types text/plain text/css text/javascript;
|
gzip_types text/plain text/css text/javascript;
|
||||||
|
|
||||||
|
log_format main 'remote_addr -remote_user [time_local] "request" '
|
||||||
|
'statusbody_bytes_sent "http_referer" '
|
||||||
|
'"http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
upstream backend {
|
upstream backend {
|
||||||
server backend:8000;
|
server backend:8000;
|
||||||
@ -38,8 +41,8 @@ http {
|
|||||||
if ($http_user_agent ~* "Amazonbot|meta-externalagent|ClaudeBot|ahrefsbot|semrushbot") {
|
if ($http_user_agent ~* "Amazonbot|meta-externalagent|ClaudeBot|ahrefsbot|semrushbot") {
|
||||||
return 444;
|
return 444;
|
||||||
}
|
}
|
||||||
|
access_log /var/log/nginx/access.log main;
|
||||||
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
|
||||||
}
|
}
|
||||||
access_log /var/log/nginx/access.log;
|
|
||||||
error_log /var/log/nginx/error.log warn;
|
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ services:
|
|||||||
- media_files:/usr/src/app/media
|
- media_files:/usr/src/app/media
|
||||||
- log_files:/var/log/nginx
|
- log_files:/var/log/nginx
|
||||||
env_file: .env.prod
|
env_file: .env.prod
|
||||||
|
command: /bin/sh -c "rm /var/log/nginx/access.log /var/log/nginx/error.log && nginx -g 'daemon off;'"
|
||||||
ports:
|
ports:
|
||||||
- 6380:80
|
- 6380:80
|
||||||
depends_on:
|
depends_on:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user