Welcome! Log In Create A New Profile

Advanced

Re: NGINX and Lumen (Laravel) 5

Reinis Rozitis
July 27, 2016 03:44PM
> Will consider it, but as menitoned above, making laravel "the" site is not
> appropriate for my context.

Because of how nginx locations work (only one gets chosen for a request)
running several applications under one virtualserver/domain can sometimes be
challenging.

Also because the laravel/lumen applications do have their 'public' as second
level folder means if you put the whole application into existing root all
the "non-public" (upper-level) folders get somewhat exposed.


If the Lumen app is outside the default root you could try something like
this:


location ^~ /lumen {
alias /usr/share/path/to/my/lumen/public;
try_files $uri $uri/ /lumen/index.php?$query_string;

location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
}


There is an extra nested location .php {} within the /lumen location since
if you have a global *.php block the request won't have the alias directive
active.


rr

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