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 {
3030 ~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
3131 default $request_uri;
3232}
33- log_format main '$remote_addr - $remote_user [$time_local] '
33+ log_format gitlab_access '$remote_addr - $remote_user [$time_local] '
3434 '"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
3535 '"$http_referer" "$http_user_agent"';
3636
@@ -58,7 +58,7 @@ server {
5858 add_header Strict-Transport-Security "max-age={{NGINX_HSTS_MAXAGE}};";
5959
6060 ## 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 ;
6262 error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
6363
6464 location / {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ server {
1111 server_name {{GITLAB_REGISTRY_HOST}};
1212 server_tokens off; ## Don't show the nginx version number, a security best practice
1313 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 ;
1515 error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
1616}
1717
@@ -36,7 +36,7 @@ server {
3636 ssl_session_cache builtin:1000 shared:SSL:10m;
3737 ssl_session_timeout 5m;
3838
39- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
39+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access ;
4040 error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
4141
4242 location / {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ map $request_uri $obfuscated_request_uri {
3434 ~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
3535 default $request_uri;
3636}
37- log_format main '$remote_addr - $remote_user [$time_local] '
37+ log_format gitlab_ssl_access '$remote_addr - $remote_user [$time_local] '
3838 '"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
3939 '"$http_referer" "$http_user_agent"';
4040
@@ -49,7 +49,7 @@ server {
4949 server_name _; ## Replace this with something like gitlab.example.com
5050 server_tokens off; ## Don't show the nginx version number, a security best practice
5151 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 ;
5353 error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
5454}
5555
@@ -103,7 +103,7 @@ server {
103103 ssl_dhparam {{SSL_DHPARAM_PATH}};
104104
105105 ## 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 ;
107107 error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
108108
109109 location / {
You can’t perform that action at this time.
0 commit comments