mirror of
https://github.com/nextcloud/docker.git
synced 2025-02-10 21:18:27 +01:00
Update examples nginx configuration (#2307)
* Update config based on the official docs Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Update all example nginx configs according to the documentation Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> --------- Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com>
This commit is contained in:
parent
5a242f6055
commit
8c777a4144
4 changed files with 12 additions and 8 deletions
|
@ -14,6 +14,7 @@ http {
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
types {
|
types {
|
||||||
text/javascript mjs;
|
text/javascript mjs;
|
||||||
|
application/wasm wasm;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
@ -143,7 +144,7 @@ http {
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
# Required for legacy support
|
# Required for legacy support
|
||||||
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
@ -166,7 +167,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Serve static files
|
# Serve static files
|
||||||
location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
|
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
|
||||||
try_files $uri /index.php$request_uri;
|
try_files $uri /index.php$request_uri;
|
||||||
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
||||||
add_header Referrer-Policy "no-referrer" always;
|
add_header Referrer-Policy "no-referrer" always;
|
||||||
|
|
|
@ -14,6 +14,7 @@ http {
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
types {
|
types {
|
||||||
text/javascript mjs;
|
text/javascript mjs;
|
||||||
|
application/wasm wasm;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
@ -143,7 +144,7 @@ http {
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
# Required for legacy support
|
# Required for legacy support
|
||||||
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
@ -166,7 +167,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Serve static files
|
# Serve static files
|
||||||
location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
|
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
|
||||||
try_files $uri /index.php$request_uri;
|
try_files $uri /index.php$request_uri;
|
||||||
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
||||||
add_header Referrer-Policy "no-referrer" always;
|
add_header Referrer-Policy "no-referrer" always;
|
||||||
|
|
|
@ -14,6 +14,7 @@ http {
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
types {
|
types {
|
||||||
text/javascript mjs;
|
text/javascript mjs;
|
||||||
|
application/wasm wasm;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
@ -143,7 +144,7 @@ http {
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
# Required for legacy support
|
# Required for legacy support
|
||||||
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
@ -166,7 +167,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Serve static files
|
# Serve static files
|
||||||
location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
|
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
|
||||||
try_files $uri /index.php$request_uri;
|
try_files $uri /index.php$request_uri;
|
||||||
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
||||||
add_header Referrer-Policy "no-referrer" always;
|
add_header Referrer-Policy "no-referrer" always;
|
||||||
|
|
|
@ -14,6 +14,7 @@ http {
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
types {
|
types {
|
||||||
text/javascript mjs;
|
text/javascript mjs;
|
||||||
|
application/wasm wasm;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
@ -143,7 +144,7 @@ http {
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
# Required for legacy support
|
# Required for legacy support
|
||||||
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
@ -166,7 +167,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Serve static files
|
# Serve static files
|
||||||
location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
|
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
|
||||||
try_files $uri /index.php$request_uri;
|
try_files $uri /index.php$request_uri;
|
||||||
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
||||||
add_header Referrer-Policy "no-referrer" always;
|
add_header Referrer-Policy "no-referrer" always;
|
||||||
|
|
Loading…
Reference in a new issue