summaryrefslogtreecommitdiffstats
path: root/ansible/templates/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/templates/nginx.conf')
-rw-r--r--ansible/templates/nginx.conf14
1 files changed, 7 insertions, 7 deletions
diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf
index 04e5a643..003720bc 100644
--- a/ansible/templates/nginx.conf
+++ b/ansible/templates/nginx.conf
@@ -1,4 +1,4 @@
-proxy_cache_path /var/cache/lemmy_frontend levels=1:2 keys_zone=lemmy_frontend_cache:10m max_size=100m use_temp_path=off;
+proxy_cache_path /var/cache/lemmy/{{ domain }} levels=1:2 keys_zone=lemmy_frontend_cache_{{ domain }}:10m max_size=100m use_temp_path=off;
server {
listen 80;
@@ -52,7 +52,7 @@ server {
client_max_body_size 50M;
location / {
- proxy_pass http://0.0.0.0:8536;
+ proxy_pass http://0.0.0.0:{{ lemmy_port }};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -63,7 +63,7 @@ server {
proxy_set_header Connection "upgrade";
# Proxy Cache
- proxy_cache lemmy_frontend_cache;
+ proxy_cache lemmy_frontend_cache_{{ domain }};
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_cache_revalidate on;
proxy_cache_lock on;
@@ -71,7 +71,7 @@ server {
}
location /pictshare/ {
- proxy_pass http://0.0.0.0:8537/;
+ proxy_pass http://0.0.0.0:{{ pictshare_port }}/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -82,7 +82,7 @@ server {
}
location /iframely/ {
- proxy_pass http://0.0.0.0:8061/;
+ proxy_pass http://0.0.0.0:{{ iframely_port }}/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -98,6 +98,6 @@ map $remote_addr $remote_addr_anon {
::1 $remote_addr;
default 0.0.0.0;
}
-log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" '
+log_format main_{{ domain }} '$remote_addr_anon - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent"';
-access_log /var/log/nginx/access.log main;
+access_log /var/log/nginx/access.log main_{{ domain }};