-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NGINX Root Location #19
Comments
I was deploying a Laravel app with I had to create a
Redirecting every request to the index.php is a common practice in many PHP Frameworks/CMS like Laravel, Symfony, WordPress, etc.
Since this piece of config is very common maybe it would be a good idea to add a new environment variable, something like I would like to know what you think about this change. If you are open to merge something like this I can work on this and I would send a PR with the changes needed. |
@dvigueras this seems like a reasonable thing for the buildpacks to do. I wonder if there is a way to introduce this functionality without needing an environment variable. Could you clarify what your app structure looks like that you needed to add that configuration? |
I'm building a container with a Laravel application (a blog). I'm using the Laravel needs an nginx directive (https://laravel.com/docs/9.x/deployment#nginx) to direct the incoming requests where the requested file doesn't exist to the
This way the Framework can intercept the request and the look for the requested route in the list of routes defined in the Laravel application. e.g.: nginx receives an incoming request for the If Laravel is not able to match the requested path then it will return the 404 Framework page. I've been able to achieve this behaviour with a custom |
Also I've noticed of another issue with my Laravel project and the current implementation of the buildpack. In my project I am using Livewire (https://laravel-livewire.com/). This library adds a route to What is happening right now in nginx is that the incoming request is matching this location block.
instead of my A possible idea would be to add a new environment variable to be able to disable this location block (it would be similar as the work done with the |
Linking to an issue that was lingering on the archived php-web repo: paketo-buildpacks/php-web#207
The text was updated successfully, but these errors were encountered: