guys!
I'm trying to figure out, how to show maintenance only when .lock
file is present. The problem is, that I'm using symfony2 for my project. And I can't get it work.
I'm trying to do something like this (nginx config):
location / {
if (-f $document_root/.lock) {
rewrite ^ /maintenance last;
break;
}
index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/.*\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
}
The page is shown, but all static files are redirected to /maintenance too. Please help!