server {
listen 80;
server_name domain.ltd;
root /path/to/webapp/directory;
index index.php;
access_log /path/to/access_log;
error_log /path/to/error_log;
location / {
try_files $uri $uri/ /index.php?r=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
}
|