mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
Change nginx log format name from main
it reports error as it is duplicated
This commit is contained in:
parent
9dff930f5f
commit
fc0012a696
@ -30,7 +30,7 @@ map $request_uri $obfuscated_request_uri {
|
||||
~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
|
||||
default $request_uri;
|
||||
}
|
||||
log_format main '$remote_addr - $remote_user [$time_local] '
|
||||
log_format gitlab_access '$remote_addr - $remote_user [$time_local] '
|
||||
'"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
@ -58,7 +58,7 @@ server {
|
||||
add_header Strict-Transport-Security "max-age={{NGINX_HSTS_MAXAGE}};";
|
||||
|
||||
## Individual nginx logs for this GitLab vhost
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_access;
|
||||
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
|
||||
|
||||
location / {
|
||||
|
||||
@ -11,7 +11,7 @@ server {
|
||||
server_name {{GITLAB_REGISTRY_HOST}};
|
||||
server_tokens off; ## Don't show the nginx version number, a security best practice
|
||||
return 301 https://$http_host:$request_uri;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access;
|
||||
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ server {
|
||||
ssl_session_cache builtin:1000 shared:SSL:10m;
|
||||
ssl_session_timeout 5m;
|
||||
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access;
|
||||
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
|
||||
|
||||
location / {
|
||||
|
||||
@ -34,7 +34,7 @@ map $request_uri $obfuscated_request_uri {
|
||||
~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
|
||||
default $request_uri;
|
||||
}
|
||||
log_format main '$remote_addr - $remote_user [$time_local] '
|
||||
log_format gitlab_ssl_access '$remote_addr - $remote_user [$time_local] '
|
||||
'"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
@ -49,7 +49,7 @@ server {
|
||||
server_name _; ## Replace this with something like gitlab.example.com
|
||||
server_tokens off; ## Don't show the nginx version number, a security best practice
|
||||
return 301 https://$host:{{GITLAB_PORT}}$request_uri;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_ssl_access;
|
||||
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ server {
|
||||
ssl_dhparam {{SSL_DHPARAM_PATH}};
|
||||
|
||||
## Individual nginx logs for this GitLab vhost
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_ssl_access;
|
||||
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
|
||||
|
||||
location / {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user