Welcome! Log In Create A New Profile

Advanced

Re: NGINX and Lumen (Laravel) 5

Ben
July 27, 2016 12:28PM
On 27/07/2016 16:07, Francis Daly wrote:

>
> 405 is usually "Method Not Allowed", such as when you try to POST to a file.
>
> But in this case, you do your own "return 405".

POST was just an example, the config doesn't work with GET or anything else.


> What happens if the nginx user does
>
> ls -l "/usr/share/path/to/my/lumen/public/directory/<snip>/public/lumen/"

Doesn't exist.

"/usr/share/path/to/my/lumen/public/directory/<snip>/public"

exists, but the /lumen/ suffix doesn't.

>
> ? And: does that error.log entry only appear once? I would expect it
> twice per request, given your config.

Only appears once.


>
>> location /lumen {
>> root /usr/share/path/to/my/lumen/public/directory/<snip>/public;
>> try_files $uri $uri/ /index.php?$query_string;
>
> So, $uri fails (permission denied), $uri/ fails (permission denied),
> so now there is an internal rewrite to /index.php.
>
>> location ~ [^/]\.php(/|$) {
>> fastcgi_split_path_info ^(.+?\.php)(/.*)$;
>> if (!-f $document_root$fastcgi_script_name) {
>> return 405;
>> }
>
> And unless /usr/local/nginx/html/index.php exists, that "return 405"
> will happen.

"/usr/share/path/to/my/lumen/public/directory/<snip>/public/index.php"
exists
"/usr/share/path/to/my/lumen/public/directory/<snip>/public/lumen/index.php"
does not, and that seems to be where NGINX is insistent on going.

..
>
> Does searching for something like "site:laravel.com nginx" or
> "site:nginx.com laravel" or "site:nginx.org laravel" return useful docs?
>

Admittely I didn't try "site:" but I did try "nginx laravel", tried a
few ideas from various stackexchange discussions but nothing much seemed
to fix it. Hence I thought I'd drop by here incase anyone had
experienced it before and could save me spending another few hours
looking for the proverbial needle in a haystack (since I bet it will end
up being a stupidly small NGINX config file change I need to make !).

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

NGINX and Lumen (Laravel) 5

Ben July 27, 2016 09:44AM

Re: NGINX and Lumen (Laravel) 5

Reinis Rozitis July 27, 2016 10:52AM

Re: NGINX and Lumen (Laravel) 5

Ben July 27, 2016 12:24PM

Re: NGINX and Lumen (Laravel) 5

Reinis Rozitis July 27, 2016 12:40PM

Re: NGINX and Lumen (Laravel) 5

Ben July 27, 2016 01:18PM

Re: NGINX and Lumen (Laravel) 5

Reinis Rozitis July 27, 2016 03:44PM

Re: NGINX and Lumen (Laravel) 5

Francis Daly July 27, 2016 11:08AM

Re: NGINX and Lumen (Laravel) 5

Ben July 27, 2016 12:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready