From f0f96f83c2630e890a2cbcab53f77fd4c37e1684 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Thu, 19 Feb 2026 02:43:23 -0500 Subject: Models, Project files, some pytests, requirements.. etc --- nginx.conf | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 nginx.conf (limited to 'nginx.conf') diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..d58f4b1 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,39 @@ +user www-data; +worker_processes 1; +pid /run/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; +events { + worker_connections 512; +} +http { + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; + + # `$upstream_http_x_route` and $upstream_http_x_cache_hit are custom headers set by me in the flask app + # All values needs to be in quotes b/c if a variable is empty, it puts '-' which is not valid json + log_format json_logs escape=json '{' + '"time_local":"$time_local",' + '"time":"$msec",' + '"client":"$remote_addr",' + '"forwarded_for":"$http_x_forwarded_for",' + '"method":"$request_method",' + '"request":"$request",' + '"request_length":"$request_length",' + '"status":"$status",' + '"bytes_sent":"$bytes_sent",' + '"referer":"$http_referer",' + '"user_agent":"$http_user_agent",' + '"upstream_status":"$upstream_status",' + '"request_time":"$request_time",' + '"upstream_response_time":"$upstream_response_time",' + '"upstream_connect_time":"$upstream_connect_time",' + '"upstream_header_time":"$upstream_header_time",' + '"upstream_route":"$upstream_http_x_route",' + '"upstream_cache_hit":"$upstream_http_x_cache_hit",' + '"host":"$host",' + '"http_host":"$http_host"' + '}'; + + access_log /var/log/nginx/access.log json_logs; + error_log /var/log/nginx/error.log; +} \ No newline at end of file -- cgit v1.2.3