Small error in there. That would have to be:
[code]
location / {
try_files /pr/cache/$uri $uri /pr/index.php?q=$uri;
}
location ~ \.php$ {
...
}
[/code]
or :
[code]
location / {
try_files /pr/cache/$uri $uri @dynamic;
}
location @dynamic {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location ~ \.php$ {
...
}
[/code]
We have to use the second version with Drupal because Drupal sometimes flakes on the leading slash in $uri. Go figure.
If you're just using nginx for the static files and want to proxy to Apache or something else instead of using fastcgi/php for dynamic requests it'd be something like:
[code]
location / {
try_files /pr/cache/$uri $uri @dynamic;
}
location @dynamic {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:8080;
}
[/code]