Skip to content

Commit

Permalink
Split nginx logs
Browse files Browse the repository at this point in the history
  • Loading branch information
fauust committed Oct 15, 2024
1 parent 15e29b8 commit c315505
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
27 changes: 15 additions & 12 deletions docker-compose/nginx/templates/bb.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ server {
proxy_pass http://127.0.0.1:8010;
}

# disable logging for wsgi_dashboards/styles.css since it's generated
# somewhere and mess with fail2ban //TEMP find the root cause!
location ~ /wsgi_dashboards/styles.css* {
access_log off;
}
location = /favicon.ico {
access_log off;
}
location = /robots.txt {
access_log off;
}

# Server sent event (sse) settings
location /sse {
proxy_buffering off;
Expand All @@ -96,4 +84,19 @@ server {
alias /srv/cr/static;
}

# logging
access_log /var/log/nginx/${NGINX_BUILDBOT_VHOST}.access.log;
error_log /var/log/nginx/${NGINX_BUILDBOT_VHOST}.error.log;

# disable logging for wsgi_dashboards/styles.css since it's generated
# somewhere and mess with fail2ban //TEMP find the root cause!
location ~ /wsgi_dashboards/styles.css* {
access_log off;
}
location = /favicon.ico {
access_log off;
}
location = /robots.txt {
access_log off;
}
}
6 changes: 5 additions & 1 deletion docker-compose/nginx/templates/ci.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ server {
msie_padding off;

# Enable gzipped format
#gzip on; already on in main conf
# gzip on; already on in main conf
# Set level of compression
gzip_comp_level 3;
# Set mime types
Expand All @@ -74,4 +74,8 @@ server {
# limit_req zone=default burst=10 nodelay;

error_page 404 /older_builds$request_uri;

# logging
access_log /var/log/nginx/${NGINX_ARTIFACTS_VHOST}.access.log;
error_log /var/log/nginx/${NGINX_ARTIFACTS_VHOST}.error.log;
}

0 comments on commit c315505

Please sign in to comment.