File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
assets/runtime/config/nginx Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ map $request_uri $obfuscated_request_uri {
30
30
~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
31
31
default $request_uri;
32
32
}
33
- log_format main '$remote_addr - $remote_user [$time_local] '
33
+ log_format gitlab_access '$remote_addr - $remote_user [$time_local] '
34
34
'"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
35
35
'"$http_referer" "$http_user_agent"';
36
36
@@ -58,7 +58,7 @@ server {
58
58
add_header Strict-Transport-Security "max-age={{NGINX_HSTS_MAXAGE}};";
59
59
60
60
## Individual nginx logs for this GitLab vhost
61
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main ;
61
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_access ;
62
62
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
63
63
64
64
location / {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ server {
11
11
server_name {{GITLAB_REGISTRY_HOST}};
12
12
server_tokens off; ## Don't show the nginx version number, a security best practice
13
13
return 301 https://$http_host:$request_uri;
14
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
14
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access ;
15
15
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
16
16
}
17
17
@@ -36,7 +36,7 @@ server {
36
36
ssl_session_cache builtin:1000 shared:SSL:10m;
37
37
ssl_session_timeout 5m;
38
38
39
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
39
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access ;
40
40
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
41
41
42
42
location / {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ map $request_uri $obfuscated_request_uri {
34
34
~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
35
35
default $request_uri;
36
36
}
37
- log_format main '$remote_addr - $remote_user [$time_local] '
37
+ log_format gitlab_ssl_access '$remote_addr - $remote_user [$time_local] '
38
38
'"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
39
39
'"$http_referer" "$http_user_agent"';
40
40
@@ -49,7 +49,7 @@ server {
49
49
server_name _; ## Replace this with something like gitlab.example.com
50
50
server_tokens off; ## Don't show the nginx version number, a security best practice
51
51
return 301 https://$host:{{GITLAB_PORT}}$request_uri;
52
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main ;
52
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_ssl_access ;
53
53
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
54
54
}
55
55
@@ -103,7 +103,7 @@ server {
103
103
ssl_dhparam {{SSL_DHPARAM_PATH}};
104
104
105
105
## Individual nginx logs for this GitLab vhost
106
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main ;
106
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_ssl_access ;
107
107
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
108
108
109
109
location / {
You can’t perform that action at this time.
0 commit comments