Fix up cdn log names and redirect directives
This commit is contained in:
@@ -12,7 +12,7 @@ log_format files_cache '$remote_addr - $upstream_cache_status [$time_local] '
|
|||||||
'"$request" $status $body_bytes_sent '
|
'"$request" $status $body_bytes_sent '
|
||||||
'"$http_referer" "$http_user_agent"';
|
'"$http_referer" "$http_user_agent"';
|
||||||
|
|
||||||
proxy_cache_path /data/nginx/cache keys_zone=mycache:50m inactive=3d;
|
proxy_cache_path /data/nginx/cache keys_zone=mycache:50m inactive=7d;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
@@ -25,8 +25,8 @@ server {
|
|||||||
ssl_certificate /etc/nginx/ssl/cdn.fullchain.pem;
|
ssl_certificate /etc/nginx/ssl/cdn.fullchain.pem;
|
||||||
ssl_certificate_key /etc/nginx/ssl/cdn.privkey.pem;
|
ssl_certificate_key /etc/nginx/ssl/cdn.privkey.pem;
|
||||||
|
|
||||||
access_log /var/log/nginx/{{ ENV_PRODUCTION['S3_ALIAS_HOST'] }}.access.log files_cache;
|
access_log /var/log/nginx/cdn.access.log files_cache;
|
||||||
error_log /var/log/nginx/{{ ENV_PRODUCTION['S3_ALIAS_HOST'] }}.error.log;
|
error_log /var/log/nginx/cdn.error.log;
|
||||||
|
|
||||||
proxy_cache mycache;
|
proxy_cache mycache;
|
||||||
keepalive_timeout 30;
|
keepalive_timeout 30;
|
||||||
|
|||||||
@@ -63,8 +63,11 @@ server {
|
|||||||
location = / {
|
location = / {
|
||||||
rewrite / https://{{ PREFERRED_ALT_DOMAIN }}/ redirect;
|
rewrite / https://{{ PREFERRED_ALT_DOMAIN }}/ redirect;
|
||||||
}
|
}
|
||||||
{% endif %}
|
location ~ ^/@(.+)?$ {
|
||||||
|
rewrite ^/(@.*) https://{{ PREFERRED_ALT_DOMAIN }}/$1 permanent;
|
||||||
|
}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
location / {
|
location / {
|
||||||
try_files $uri @proxy;
|
try_files $uri @proxy;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user