mirror of https://github.com/LemmyNet/lemmy.git
Consistent variable formatting for easy replacement with sed
parent
5c1dd66380
commit
a87c0d6b88
|
@ -3,7 +3,7 @@ limit_req_zone $binary_remote_addr zone=lemmy_ratelimit:10m rate=1r/s;
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name {{ domain }};
|
server_name {{domain}};
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
root /var/www/certbot;
|
root /var/www/certbot;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ server {
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name {{ domain }};
|
server_name {{domain}};
|
||||||
|
|
||||||
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{domain}}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{domain}}/privkey.pem;
|
||||||
|
@ -59,15 +59,15 @@ server {
|
||||||
# lemmy_ui_port: 1235
|
# lemmy_ui_port: 1235
|
||||||
# lemmy_port: 8536
|
# lemmy_port: 8536
|
||||||
|
|
||||||
set $proxpass "http://0.0.0.0:{{ lemmy_ui_port }}";
|
set $proxpass "http://0.0.0.0:{{lemmy_ui_port}}";
|
||||||
if ($http_accept = "application/activity+json") {
|
if ($http_accept = "application/activity+json") {
|
||||||
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
|
set $proxpass "http://0.0.0.0:{{lemmy_port}}";
|
||||||
}
|
}
|
||||||
if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
|
if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
|
||||||
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
|
set $proxpass "http://0.0.0.0:{{lemmy_port}}";
|
||||||
}
|
}
|
||||||
if ($request_method = POST) {
|
if ($request_method = POST) {
|
||||||
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
|
set $proxpass "http://0.0.0.0:{{lemmy_port}}";
|
||||||
}
|
}
|
||||||
proxy_pass $proxpass;
|
proxy_pass $proxpass;
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ server {
|
||||||
|
|
||||||
# backend
|
# backend
|
||||||
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
|
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
|
||||||
proxy_pass http://0.0.0.0:{{ lemmy_port }};
|
proxy_pass http://0.0.0.0:{{lemmy_port}};
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
Loading…
Reference in New Issue