1
mirror of https://github.com/jakejarvis/mastodon-utils.git synced 2025-10-25 15:15:48 -04:00

commit more config files (safely)

This commit is contained in:
2022-12-10 13:09:42 -05:00
parent 22a26e9829
commit a061a510ee
8 changed files with 3758 additions and 5 deletions

50
etc/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,50 @@
user mastodon; # jake: changed from nginx
worker_processes auto;
pid /run/nginx.pid;
# jake: added
load_module modules/ngx_http_brotli_filter_module.so;
load_module modules/ngx_http_brotli_static_module.so;
events {
worker_connections 768;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# jake: added (prometheus target)
server {
listen 9181;
location /metrics {
stub_status on;
allow 127.0.0.1;
deny all;
}
}
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

View File

@@ -155,6 +155,10 @@ server {
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
# jake: added (debugging)
add_header Via $proxy_host;
add_header X-Got-Milk "2%";
tcp_nodelay on;
}
@@ -178,9 +182,10 @@ server {
proxy_cache_valid 200 7d;
proxy_cache_valid 410 24h;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
add_header X-Cached $upstream_cache_status;
# jake: added :)
# jake: added (debugging)
add_header Via $proxy_host;
add_header X-Cache-Status $upstream_cache_status;
add_header X-Got-Milk "2%";
tcp_nodelay on;