0.1.6-DEV-20191031-140910

-------------------------
    * ADD:
      - added special section just for seafile to proxy_site.j2; this is both unfortunate and unavoidable

    * MODIFY:
      - images.thezengarden.net was having issues chaining ssl's; its now a port 80 site with ssl handled only via nginx
This commit is contained in:
Chris Hammer 2019-10-31 14:11:14 -04:00
parent bd82ec227c
commit 2519c0b86c
3 changed files with 25 additions and 9 deletions

View File

@ -1,8 +1,8 @@
--- ---
proxy_site_conf_dir : /etc/nginx/conf.d proxy_site_conf_dir : /etc/nginx/conf.d
proxy_site_file : "{{ proxy_site_conf_dir }}/zen_proxy.conf" proxy_site_file : "{{ proxy_site_conf_dir }}/zen_proxy.conf"
proxy_site_version : 1.5 proxy_site_version : 1.8
proxy_site_revision : 20191030-213756 proxy_site_revision : 20191031-132522
proxy_site_log_path : /proxy_logs proxy_site_log_path : /proxy_logs

View File

@ -90,6 +90,7 @@ proxy_sites:
proto : http proto : http
dest : sa.thezengarden.net dest : sa.thezengarden.net
port : 8000 port : 8000
seafhttp_port : 8082
max_upload : "{{ proxy_default_max_upload }}" max_upload : "{{ proxy_default_max_upload }}"
@ -106,9 +107,9 @@ proxy_sites:
images.thezengarden.net: images.thezengarden.net:
proto : https proto : http
dest : "{{ proxy_default_host }}" dest : "{{ proxy_default_host }}"
port : 443 port : 80
max_upload : "{{ proxy_default_max_upload }}" max_upload : "{{ proxy_default_max_upload }}"

View File

@ -31,7 +31,8 @@ client_max_body_size {{ proxy_sites[item.key]['max_upload'] }};
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; #proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_pass {{ proxy_sites[item.key]['proto'] }}://{{ proxy_sites[item.key]['dest'] }}:{{ proxy_sites[item.key]['port'] }}; proxy_pass {{ proxy_sites[item.key]['proto'] }}://{{ proxy_sites[item.key]['dest'] }}:{{ proxy_sites[item.key]['port'] }};
@ -40,4 +41,18 @@ client_max_body_size {{ proxy_sites[item.key]['max_upload'] }};
# re-write redirects to http as to https # re-write redirects to http as to https
proxy_redirect http:// https://; proxy_redirect http:// https://;
} }
{% if item.key == "seafile.thezengarden.net" %}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass {{ proxy_sites[item.key]['proto'] }}://{{ proxy_sites[item.key]['dest'] }}:{{ proxy_sites[item.key]['seafhttp_port'] }};
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
proxy_request_buffering off;
}
{% endif %}
} }