diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bc2db0e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: "3.6" + +services: + nginx-proxy: + build: . + image: mattipaksula/nginx-proxy:v3 diff --git a/docker/nginx.conf b/docker/nginx.conf index 5e70c80..faa9cf4 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -14,7 +14,7 @@ events { http { include /etc/nginx/mime.types; default_type application/octet-stream; - + log_format main '$host $remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; @@ -73,4 +73,4 @@ http { include /etc/nginx/conf.d/*.conf; -} \ No newline at end of file +} diff --git a/vhosts_template/default.conf.template b/vhosts_template/default.conf.template index 3a3d9ba..df730e7 100644 --- a/vhosts_template/default.conf.template +++ b/vhosts_template/default.conf.template @@ -22,6 +22,7 @@ server{ ssl_certificate_key /etc/ssl/private/{{ server.ssl_file }}.key; ssl_stapling on; ssl_stapling_verify on; + client_max_body_size 9999m; add_header Strict-Transport-Security "max-age=31536000" always; {% for location in server.locations %} location {{ location.name }} { {% if location.upstream %} @@ -36,11 +37,12 @@ server{ proxy_read_timeout 7d; proxy_send_timeout 7d;{% endif %} }{% endfor %} - + }{% else %} server{ listen {{ server.port }}; server_name {{ server.hostname }};{% for location in server.locations %} + client_max_body_size 9999m; location {{ location.name }} { {% if location.upstream %} proxy_pass {{ location.container.scheme }}://{{ location.upstream }}{{location.container.path}};{% else %} proxy_pass {{location.container.scheme }}://{{ location.container.address }}:{{ location.container.port }}{{ location.container.path }};{% endif %}{% if location.name != '/' %}