Welcome! Log In Create A New Profile

Advanced

Setting up Laravel 5.1 project in a subfolder

Posted by arronar 
Setting up Laravel 5.1 project in a subfolder
June 10, 2016 01:02PM
Hi.

My nginx document root directory is /srv/http

Inside that directory i created another directory called finics. In that directory i moved a laravel project and add the following location block to my nginx configuration file.

[code]
location ^~ /finics {
root /srv/http/finics/public;

try_files $uri $uri/ /finics/index.php?$query_string;

location ~ \.php(?:$|/) {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
[/code]

Now when i visit localhost/finics, laravel returns me a NotFoundHttpException in RouteCollection.php line 161.

I posted that issue on laravel's forum but they couldn't find the problem.
I'm thinking that it might be due to the subfolder misconfiguration in nginx and that, creates a problem with the routes.

Any idea will be welcomed.

Thank you.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 224
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready