Alan Orth
2156f8b07d
My WordPress blogs have a /wordpress subdirectory in the document root, but I don't serve from the /wordpress URI. Technically, all we need is the tweaks to the try_files: - `?args` passes query strings to php5-fpm - removing 404 from the vhost's try_files so we don't return 404 when the requested file doesn't exist (obviously not all request URI's in WordPress are actual files on the disk) Signed-off-by: Alan Orth <alan.orth@gmail.com>
11 lines
279 B
Django/Jinja
11 lines
279 B
Django/Jinja
|
|
# try for WordPress index.php in /
|
|
# fall back to index.php + args (passed to php5-fpm later)
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
# Add trailing slash to */wp-admin requests.
|
|
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
|
|