lemmy: lemmy.hacktivism.ch behind Caddy :9026
This commit is contained in:
parent
0ab4b08aac
commit
66dbf417f8
18 changed files with 327 additions and 6 deletions
44
configs/lemmy/nginx_internal.conf
Normal file
44
configs/lemmy/nginx_internal.conf
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
# Podman default network DNS (not Docker 127.0.0.11).
|
||||
resolver 10.89.0.1 valid=5s;
|
||||
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 172.16.0.0/12;
|
||||
set_real_ip_from 192.168.0.0/16;
|
||||
|
||||
map "$request_method:$http_accept" $proxpass {
|
||||
default "http://lemmy-ui:1234";
|
||||
"~^(?:GET|HEAD):.*?application\/(?:activity|ld)\+json" "http://lemmy:8536";
|
||||
"~^(?!(GET|HEAD)).*:" "http://lemmy:8536";
|
||||
}
|
||||
|
||||
server {
|
||||
set $lemmy_ui "lemmy-ui:1234";
|
||||
set $lemmy "lemmy:8536";
|
||||
listen 8536;
|
||||
server_name localhost;
|
||||
server_tokens off;
|
||||
client_max_body_size 20M;
|
||||
include proxy_params;
|
||||
|
||||
location / {
|
||||
proxy_pass $proxpass;
|
||||
rewrite ^(.+)/+$ $1 permanent;
|
||||
}
|
||||
|
||||
location = /.well-known/security.txt {
|
||||
proxy_pass "http://$lemmy_ui";
|
||||
}
|
||||
|
||||
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known|version|sitemap.xml) {
|
||||
proxy_pass "http://$lemmy";
|
||||
include proxy_params;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue