Consistent variable formatting for easy replacement with sed

ansible-changes
Felix Ableitner 2021-09-14 14:34:35 +02:00
parent 5c1dd66380
commit a87c0d6b88
1 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ limit_req_zone $binary_remote_addr zone=lemmy_ratelimit:10m rate=1r/s;
server {
listen 80;
listen [::]:80;
server_name {{ domain }};
server_name {{domain}};
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
@ -15,7 +15,7 @@ server {
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ domain }};
server_name {{domain}};
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{domain}}/privkey.pem;
@ -59,15 +59,15 @@ server {
# lemmy_ui_port: 1235
# 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") {
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\"") {
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
set $proxpass "http://0.0.0.0:{{lemmy_port}}";
}
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;
@ -81,7 +81,7 @@ server {
# backend
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_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";