Files
monica/nginx_app.conf
T
2019-01-23 14:39:44 +01:00

22 lines
643 B
Plaintext

location / {
# try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}
location @rewriteapp {
# Redirect .well-known urls (https://en.wikipedia.org/wiki/List_of_/.well-known/_services_offered_by_webservers)
rewrite .well-known/carddav /dav/ permanent;
rewrite .well-known/caldav /dav/ permanent;
rewrite .well-known/security.txt$ /security.txt permanent;
# Old carddav url
rewrite carddav/(.*) /dav/$1 permanent;
# rewrite all to app.php
rewrite ^(.*)$ /index.php/$1 last;
}
location ~ ^/(app|app_dev|config)\.php(/|$) {
try_files @heroku-fcgi @heroku-fcgi;
internal;
}