Answer the question
In order to leave comments, you need to log in
How to properly set up rewrite in nginx?
How to properly set up rewrite in nginx for slim to work?
url parameters do not work,
for example, it works without parameters
$app->get('/', function ($request, $response, $args) {
$response->write("Welcome to Slim!");
return $response;
});
$app->get('/hello[/{name}]', function ($request, $response, $args) {
$response->write("Hello, " . $args['name']);
return $response;
})->setArgument('name', 'World!');
Answer the question
In order to leave comments, you need to log in
I use laravel and lumen for them something like this is suitable
server {
listen 80;
server_name some.site.my;
root /var/www/some.site/web/public;
index index.html index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
error_log /var/www/some.site/web/logs/error.log;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question