File tree 2 files changed +6
-3
lines changed
provision-contest/ansible/roles/domserver/templates
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ location / {
18
18
location /api/ {
19
19
try_files $uri @domjudgeFrontApi;
20
20
error_log /var/log/nginx/domjudge-api.log;
21
- access_log /var/log/nginx/domjudge-api.log;
21
+ access_log /var/log/nginx/domjudge-api.log dj_access ;
22
22
}
23
23
}
24
24
@@ -52,7 +52,7 @@ location @domjudgeFrontApi {
52
52
53
53
# Use a separate log file for the API
54
54
error_log /var/log/nginx/domjudge-api.log;
55
- access_log /var/log/nginx/domjudge-api.log;
55
+ access_log /var/log/nginx/domjudge-api.log dj_access ;
56
56
}
57
57
58
58
# The X-Frame-Options header defends against so-called 'clickjacking' attacks.
@@ -66,4 +66,4 @@ add_header X-Content-Type-Options "nosniff";
66
66
add_header X-XSS-Protection "1; mode=block";
67
67
68
68
error_log /var/log/nginx/domjudge.log;
69
- access_log /var/log/nginx/domjudge.log;
69
+ access_log /var/log/nginx/domjudge.log dj_access ;
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ upstream domjudge {
7
7
server unix:/var/run/php-fpm-domjudge.sock; # if using with etc/domjudge-fpm.conf
8
8
}
9
9
10
+ # Custom log format that adds the request processing time.
11
+ log_format dj_access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent"';
12
+
10
13
server {
11
14
listen 80 default;
12
15
server_name _default_;
You can’t perform that action at this time.
0 commit comments