mirror of
https://git.anonymousland.org/anonymousland/infrastructure.git
synced 2025-01-06 01:27:50 -05:00
8d6fb20c2c
Co-authored-by: NebulaOnion <nebulaonion@tutanota.com> Reviewed-on: https://git.anonymousland.org/anonymousland/infrastructure/pulls/5
41 lines
1006 B
Plaintext
41 lines
1006 B
Plaintext
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name lemmy.anonymousland.org;
|
|
|
|
include /config/nginx/ssl.conf;
|
|
|
|
location / {
|
|
include /config/nginx/proxy.conf;
|
|
include /config/nginx/resolver.conf;
|
|
set $upstream_app lemmy-ui;
|
|
set $upstream_port 1234;
|
|
set $upstream_proto http;
|
|
|
|
if ($request_method = POST) {
|
|
set $upstream_app lemmy;
|
|
set $upstream_port 8536;
|
|
}
|
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
|
}
|
|
|
|
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
|
|
set $upstream_app lemmy;
|
|
set $upstream_port 8536;
|
|
set $upstream_proto http;
|
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
}
|
|
|
|
# Redirect pictshare images to pictrs
|
|
location ~ /pictshare/(.*)$ {
|
|
return 301 /pictrs/image/$1;
|
|
}
|
|
|
|
|
|
}
|