Welcome! Log In Create A New Profile

Advanced

NGINX and Lumen (Laravel) 5

Ben
July 27, 2016 09:44AM
Hi,

I'm having a frustrating time trying to get Lumen (a.k.a Laravel)
working on my NGINX install.

At the moment, the best I can get NGINX to give me is 405 errors. Which
translates to the following error.log entry :

stat()
"/usr/share/path/to/my/lumen/public/directory/<snip>/public/lumen/"
failed (13: Permission denied), client: 192.168.121.10, server:
my.example.com, request: "POST /lumen/ HTTP/1.1", host: "my.example.com"

That error is in response to a simple cURL:

curl -X POST --data-raw "demo=demo&example=example"
https://my.example.com/lumen/

location /lumen {
root /usr/share/path/to/my/lumen/public/directory/<snip>/public;
allow 192.168.0.0/16;
deny all;
expires 0;
add_header Pragma "no-cache";
add_header Cache-Control "no-cache, no-store,must-revalidate";
#I have tried various "try_files..."
#try_files $uri @lumen;
try_files $uri $uri/ /index.php?$query_string;
}
location @lumen {
fastcgi_param SCRIPT_FILENAME
/usr/share/path/to/my/lumen/public/directory/<snip>/public/index.php;
fastcgi_param SCRIPT_NAME /lumen/;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param QUERY_STRING $args;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 405;
}
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}

_______________________________________________
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: 141
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