delete unused nginx configuration templates (#58346)
This commit is contained in:
parent
ae04037004
commit
5c3db6a691
|
@ -1,12 +0,0 @@
|
|||
{% extends "base-nginx-server.j2" %}
|
||||
|
||||
{% block middle %}
|
||||
location ~ ^/static/(.+)$ {
|
||||
root /;
|
||||
try_files {{tenants_dir}}/$host/static/$1
|
||||
{{tenants_dir}}/$host/theme/static/$1
|
||||
{{state_dir}}/collectstatic/$1
|
||||
=404;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
{% endblock %}
|
|
@ -1,43 +0,0 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
server_name {{nginx_host_pattern}};
|
||||
|
||||
ssl_certificate {{ssl_certificate}};
|
||||
ssl_certificate_key {{ssl_certificate_key}};
|
||||
|
||||
access_log {{nginx_log_base}}-access.log combined;
|
||||
error_log {{nginx_log_base}}-error.log;
|
||||
|
||||
location ~ ^/static/(.+)$ {
|
||||
root /;
|
||||
try_files {{tenants_dir}}/$host/static/$1
|
||||
{{tenants_dir}}/$host/theme/static/$1
|
||||
{{state_dir}}/collectstatic/$1
|
||||
=404;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header 'Service-Worker-Allowed' '/';
|
||||
}
|
||||
|
||||
location ~ ^/media/(.+)$ {
|
||||
alias {{tenants_dir}}/$host/media/$1;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:{{server_port}};
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-SSL on;
|
||||
proxy_set_header X-Forwarded-Protocol ssl;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
|
||||
# catchall http → https
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{nginx_host_pattern}};
|
||||
access_log {{nginx_log_base}}-access.log combined;
|
||||
error_log {{nginx_log_base}}-error.log;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
Loading…
Reference in New Issue