buildpacks icon indicating copy to clipboard operation
buildpacks copied to clipboard

Any way to modify nginx config for php?

Open html5maker opened this issue 3 years ago • 4 comments

I'm trying to use buildpack for PHP on Appengine flexible. The problem is that there is no way to modify the nginx config to set max upload size, timeout and serve static files (jpg, png, ...).

Any solution or hack to add additional settings to nginx config for buildpack (PHP)?

html5maker avatar Sep 04 '22 19:09 html5maker

I second this issue. Maybe I'm missing something but I really cannot figure out how to add or overwrite the nginx config.

Gdani64 avatar Oct 14 '22 16:10 Gdani64

@html5maker or @Gdani64 not sure if we actually support this, but I'm also not super familiar with how PHP applications work. Do you have a sample project /sample nginx configuration file that you could provide me so we can test it out? I may be as simple as adding a .nginx.conf.d file in your project root.

jama22 avatar Dec 02 '22 21:12 jama22

@jama22 from what I saw while searching in this repo, the nginx config is made from a template and cannot be changed or overwritten in any way afterwards. I tried adding .nginx.conf.d and it didn't do anything, the config was the same default one.

Gdani64 avatar Dec 05 '22 14:12 Gdani64

ah okay, so we might have to implement some logic there to be able to ignore the generated nginx.conf.d

I think some additional investigation is required to see if we actually do this already and its just poorly documented. If it isn't there's a feature request here to introduce the functionality to override the generated nginx.conf.d

jama22 avatar Dec 05 '22 18:12 jama22