server {
listen 80;
server_name audit.local;
root /app/audit/public;
access_log /app/audit/logs/audit.access.log main;
error_log /app/audit/logs/audit.error.log;
location / {
index index.php;
# If file not found, redirect to Zend handling, we can remove the (if) here and go directly rewrite
if (!-f $request_filename){
rewrite ^/(.+)$ /index.php?$1& last;
}
}
location ~* ^.+.(js|ico|gif|jpg|jpeg|pdf|png|css)$ {
access_log off;
expires 7d;
}
location ~ .*.php?$ {
fastcgi_pass 127.0.0.1:36;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 http://audit.local/error;
}