Using phTagr with nginx web server

It is possible to use phTagr with nginx webserver. The only problem are redirections which have to be rewritten to work with nginx.

Here goes working example of rewrites for phTagr:

if (-f $request_filename) {
    break;
}
if (!-f $request_filename) {
    rewrite ^/(.+)$ /index.php?url=$1 last;
    break;
}

If you're using more recent version of nginx you can simplify above rules to this one:

try_files $uri /index.php?url=$uri;

Just put above somewhere inside your server{} block in your nginx config.