aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2023-01-03 22:52:43 +0100
committerThomas Lange <code@nerdmind.de>2023-01-03 23:00:49 +0100
commit43bc4fb631af80431d76c5aa9009b0704d6b382f (patch)
treef96d125652bac925df84b012d5fdfc76c3fb8c5f
parentc94f872b9c2dd7e89aa5c12a504a2359edff56ee (diff)
downloadblog-43bc4fb631af80431d76c5aa9009b0704d6b382f.tar.gz
blog-43bc4fb631af80431d76c5aa9009b0704d6b382f.tar.xz
blog-43bc4fb631af80431d76c5aa9009b0704d6b382f.zip
Put "try_files" directive into "location" context
When used in the "server" context, the "try_files" directive will never get executed if there also is a "location / {}" block specified (which is most likely the case on a production vhost config).
-rw-r--r--.ht-nginx4
1 files changed, 3 insertions, 1 deletions
diff --git a/.ht-nginx b/.ht-nginx
index 168e8c0..ca9d22d 100644
--- a/.ht-nginx
+++ b/.ht-nginx
@@ -31,4 +31,6 @@ location ~ ^/(.git|core|theme/([^/]+)/(html|lang))/ {
#===============================================================================
# Pass requests to index.php
#===============================================================================
-try_files $uri $uri/ /index.php?$args;
+location / {
+ try_files $uri $uri/ /index.php?$args;
+}