Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

2023-01-06 Thread Kaushal Shriyan
On Sat, Jan 7, 2023 at 2:56 AM Francis Daly wrote: > On Thu, Jan 05, 2023 at 10:15:34PM +0530, Kaushal Shriyan wrote: > > Hi there, > > > When I hit http://mydomain.com/apis for conditions when MySQL DB is > down. I > > get the below output and it works as expected. > > > > {"errors": "MySQL DB S

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

2023-01-06 Thread Francis Daly
On Thu, Jan 05, 2023 at 10:15:34PM +0530, Kaushal Shriyan wrote: Hi there, > When I hit http://mydomain.com/apis for conditions when MySQL DB is down. I > get the below output and it works as expected. > > {"errors": "MySQL DB Server is down"} > > When I hit http://mydomain.com/apis for conditi

Re: nginx serving wrong proxy content, static assets not affected

2023-01-06 Thread Eduardo Kortright
Hi Payam, I’m not doing any caching. It looks like it is indeed a DNS problem, as the Docker containers are occasionally changing their IP address as the containers are restarted, but as Ángel pointed out, nginx does not resolve the name at each request, but only when it loads the configuratio

Re: nginx serving wrong proxy content, static assets not affected

2023-01-06 Thread Eduardo Kortright
On my staging server, I stopped container aaa (with IP address x.x.x.5); I then restarted container bbb (with IP address x.x.x.6); finally, I started aaa again. As expected, when bbb restarted it claimed aaa’s old IP address, since it was the lowest available address. When aaa started back up,

Setting response headers per file

2023-01-06 Thread Arnold Hendriks
Is there a way to have nginx serve up static content with custom headers - but being able to set these headers per file (and not in the nginx configuration) Eg. if I request http://127.0.0.1/attachment-12345 I would like nginx to use try_files to find the file 'attachment-12345' and serve it... bu