server {
listen 8080;
server_name www.tp5api.mm;
access_log /usr/local/var/www/logs/access.log;
error_log /usr/local/var/www/logs/error.log;
index index.php index.html index.htm;
root /usr/local/var/www/Tp5-Api/public/;
location / {
if (!-e $request_filename ) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}