mercredi 30 décembre 2015

nginx with site in a subdir which does not match the ends of url

When I try to use laravel PHP framework, I try to place it in a dir called /home/usr/proj/laravel, but as we know that the public html of laravel is settled in /home/usr/proj/laravel/public, thus my problem is how to make the setting of nginx such that when I access by mysite.com/laravel/ or mysite.com/laravel, we in fact redirected to the location laravel/public/index.php.

Also, it seems that there is a rule of nignx which is suggested by the official of laravel, to make the url looks pretty

location / {
         try_files $uri $uri/ /index.php?$query_string;
}

How can I use this in my case?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1ZCUdhE
via IFTTT

Aucun commentaire:

Enregistrer un commentaire