I am running a nginx/ php5.6-fpm server and I have the following
server {
listen 10080;
listen [::]:10080;
root /home/vagrant/app;
index index.php;
server_name mia-dev.dev;
port_in_redirect on;
rewrite ^/static/(.*)$ /dist/static/$1 permanent;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# load the index page on 404
error_page 404 /index.php;
# don't log requests to favicon.ico
location = /favicon.ico {
log_not_found off;
access_log off;
}
# don't log requests to robots.txt
location = /robots.txt {
log_not_found off;
access_log off;
}
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_intercept_errors on;
# fastcgi_intercept_errors on;
try_files $uri /index.php =404;
fastcgi_pass 0.0.0.0:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param HTTPS off;
}
# disable access to .htaccess files
location ~ /\.ht {
deny all;
}
sendfile off;
}
and in a php file i have
$app = new Lime\App();
$app->bind("/create/name/", function(){
return "hi mia";
});
$app->bind("/", function() {
return "hellow world";
});
$app->run();
While I get the "hello world" when going to "/" I don't get the "hi mia" when going to "/create/name"
Based on what I researched online I seemed to have done everything right so I'm not sure what is the problem....