Skip to content

Commit 8c777a4

Browse files
authored
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>
1 parent 5a242f6 commit 8c777a4

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ http {
1414
default_type application/octet-stream;
1515
types {
1616
text/javascript mjs;
17+
application/wasm wasm;
1718
}
1819

1920
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@@ -143,7 +144,7 @@ http {
143144
# to the URI, resulting in a HTTP 500 error response.
144145
location ~ \.php(?:$|/) {
145146
# Required for legacy support
146-
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
147+
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
147148

148149
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
149150
set $path_info $fastcgi_path_info;
@@ -166,7 +167,7 @@ http {
166167
}
167168

168169
# Serve static files
169-
location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
170+
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
170171
try_files $uri /index.php$request_uri;
171172
add_header Cache-Control "public, max-age=15778463$asset_immutable";
172173
add_header Referrer-Policy "no-referrer" always;

.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ http {
1414
default_type application/octet-stream;
1515
types {
1616
text/javascript mjs;
17+
application/wasm wasm;
1718
}
1819

1920
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@@ -143,7 +144,7 @@ http {
143144
# to the URI, resulting in a HTTP 500 error response.
144145
location ~ \.php(?:$|/) {
145146
# Required for legacy support
146-
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
147+
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
147148

148149
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
149150
set $path_info $fastcgi_path_info;
@@ -166,7 +167,7 @@ http {
166167
}
167168

168169
# Serve static files
169-
location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
170+
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
170171
try_files $uri /index.php$request_uri;
171172
add_header Cache-Control "public, max-age=15778463$asset_immutable";
172173
add_header Referrer-Policy "no-referrer" always;

.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ http {
1414
default_type application/octet-stream;
1515
types {
1616
text/javascript mjs;
17+
application/wasm wasm;
1718
}
1819

1920
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@@ -143,7 +144,7 @@ http {
143144
# to the URI, resulting in a HTTP 500 error response.
144145
location ~ \.php(?:$|/) {
145146
# Required for legacy support
146-
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
147+
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
147148

148149
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
149150
set $path_info $fastcgi_path_info;
@@ -166,7 +167,7 @@ http {
166167
}
167168

168169
# Serve static files
169-
location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
170+
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
170171
try_files $uri /index.php$request_uri;
171172
add_header Cache-Control "public, max-age=15778463$asset_immutable";
172173
add_header Referrer-Policy "no-referrer" always;

.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ http {
1414
default_type application/octet-stream;
1515
types {
1616
text/javascript mjs;
17+
application/wasm wasm;
1718
}
1819

1920
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@@ -143,7 +144,7 @@ http {
143144
# to the URI, resulting in a HTTP 500 error response.
144145
location ~ \.php(?:$|/) {
145146
# Required for legacy support
146-
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
147+
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri;
147148

148149
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
149150
set $path_info $fastcgi_path_info;
@@ -166,7 +167,7 @@ http {
166167
}
167168

168169
# Serve static files
169-
location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
170+
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
170171
try_files $uri /index.php$request_uri;
171172
add_header Cache-Control "public, max-age=15778463$asset_immutable";
172173
add_header Referrer-Policy "no-referrer" always;

0 commit comments

Comments
 (0)