This commit is contained in:
root 2022-12-08 12:36:56 +00:00
parent 90816c58c4
commit 1a69b2c893
2 changed files with 54 additions and 0 deletions

24
common/akkoma.conf Normal file
View File

@ -0,0 +1,24 @@
client_max_body_size 16m;
ignore_invalid_headers off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_pass http://phoenix;
}
location ~ ^/(media|proxy) {
proxy_cache akkoma_media_cache;
slice 1m;
proxy_cache_key $host$uri$is_args$args$slice_range;
proxy_set_header Range $slice_range;
proxy_cache_valid 200 206 301 304 1h;
proxy_cache_lock on;
proxy_ignore_client_abort on;
proxy_buffering on;
chunked_transfer_encoding on;
proxy_pass http://phoenix;
}

30
conf.d/akkoma.conf Normal file
View File

@ -0,0 +1,30 @@
proxy_cache_path /tmp/akkoma-media-cache levels=1:2 keys_zone=akkoma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
upstream phoenix {
server 127.0.0.1:4001 max_fails=5 fail_timeout=60s;
}
ssl_session_cache shared:ssl_session_cache:10m;
server {
listen 80;
listen [::]:80;
server_name ak.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
include common/akkoma.conf;
}
server {
listen 11089;
listen [::]:11089;
server_name vern2c3ryms73cqnxr3plef2npbwlg5mx75wigd3fve32m5iszya.b32.i2p;
include common/akkoma.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ak.vern.cc;
include snippets/lets-encrypt.conf;
include common/akkoma.conf;
}
server {
listen 80;
listen [::]:80;
server_name ak.vern.cc;
return 301 https://$host$request_uri;
}