Skip to content

Commit 4e0393f

Browse files
committed
don't log behemoth access to artifactory in nginx -- log files fill disk
1 parent a93cbf5 commit 4e0393f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

roles/nginx/templates/nginx-jenkins.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ upstream benchq {
2525
server 172.31.0.100:8084 fail_timeout=0;
2626
}
2727

28+
29+
map $remote_addr $log_ip {
30+
"54.153.2.9" 0; # jenkins-worker-behemoth-1
31+
"54.153.1.99" 0; # jenkins-worker-behemoth-2
32+
"54.183.156.89" 0; # jenkins-worker-behemoth-3
33+
34+
default 1;
35+
}
36+
2837
server {
2938
listen 80;
3039
return 301 https://$host$request_uri;
@@ -84,6 +93,7 @@ server {
8493
# e.g.: <Context path="/artifactory" docBase="${artifactory.home}/webapps/artifactory.war" processTlds="false">
8594
location /artifactory {
8695
# limit_req zone=one burst=10000 nodelay;
96+
access_log /var/log/nginx/access_artifactory.log combined if=$log_ip;
8797

8898
proxy_set_header Host $host;
8999
proxy_set_header X-Real-IP $remote_addr;

0 commit comments

Comments
 (0)