Skip to content
Snippets Groups Projects
Commit 6013239b authored by Michael.Menk's avatar Michael.Menk
Browse files

Nginx: Logformat moved to separate file

parent e3eca896
No related branches found
No related tags found
No related merge requests found
Pipeline #270672 passed
......@@ -29,6 +29,7 @@ Other tags:
### Version 3.21
* Nginx-workers is now a static number (`/etc/nginx/conf.d/workers.conf`)
* Nginx log format now set in (`/etc/nginx/http.d/00_logformat.conf`)
* A [Kubernetes/RAIL compatible container](https://git.app.uib.no/itpublic/dockerimages/alpinelinuxphpnginx-unprivileged) will be buid on top of this image
### Version 3.19
......
# Specifies the main log format.
# UiB log format
log_format main '$remote_addr - $remote_user [$time_iso8601] "$request" '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" '
'forwarded_for "$http_x_forwarded_for" '
'gzip_ratio $gzip_ratio '
'upstream_response_time $upstream_response_time '
'request_time $request_time '
'upstream_addr $upstream_addr '
'hit_nr $sent_http_X_Cache_Hits '
'cache $sent_http_X_Cache '
'content_type $sent_http_Content_Type '
'hostname $http_host ';
# Sets the path, format, and configuration for a buffered log write.
access_log /var/log/nginx/access.log main;
\ No newline at end of file
......@@ -2,7 +2,7 @@
user nginx;
# Workers et in conf.d/workers.conf
# Workers set in conf.d/workers.conf
# worker_processes auto;
# Enables the use of JIT for regular expressions to speed-up their processing.
......@@ -82,6 +82,8 @@ http {
# Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'.
gzip_vary on;
# Default log format and log file located in:
# http.d/00_logformat.conf
# Helper variable for proxying websockets.
map $http_upgrade $connection_upgrade {
......@@ -89,26 +91,6 @@ http {
'' close;
}
# Specifies the main log format.
# UiB log format
log_format main '$remote_addr - $remote_user [$time_iso8601] "$request" '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" '
'forwarded_for "$http_x_forwarded_for" '
'gzip_ratio $gzip_ratio '
'upstream_response_time $upstream_response_time '
'request_time $request_time '
'upstream_addr $upstream_addr '
'hit_nr $sent_http_X_Cache_Hits '
'cache $sent_http_X_Cache '
'content_type $sent_http_Content_Type '
'hostname $http_host ';
# Sets the path, format, and configuration for a buffered log write.
access_log /var/log/nginx/access.log main;
# Includes virtual hosts configs.
include /etc/nginx/http.d/*.conf;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment