Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "3.6"

services:
nginx-proxy:
build: .
image: mattipaksula/nginx-proxy:v3
4 changes: 2 additions & 2 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"';
Expand Down Expand Up @@ -73,4 +73,4 @@ http {

include /etc/nginx/conf.d/*.conf;

}
}
4 changes: 3 additions & 1 deletion vhosts_template/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -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 != '/' %}
Expand Down