-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Correct way to serve FastCGI from ingress controller #6897
Comments
Controller returns me 404
|
I think you should use Apache for serving php instead of nginx, inspire of wordpress images |
But my point is to use the fpm straightaway. To use the fastcgi feature listed in this extension |
Nevermind, i found out that i need to serve some static assets, thus another load balancer (nginx) is needed for my framework. All g now thanks! |
Have you been able to make this work? I am still unable (#8207) |
@robertwt7
or more convenient as for me Ingress config is the same |
After exhaustive attempts I have not once been able to get k8s team's variant for "Ingress NGINX" to actually process upstream fast cgi. My problem may be that the "NGINX" software running inside the relevant "Ingress NGINX" k8s pod (controller?) doesn't mount (by choice, my choice, in this case) the shared non-PHP content folder, and I think that might be what's missing. I also have discovered that it is, by design (which I don't entirely understand the rationale), that the devs (of k8s team's variant of "Ingress NGINX") have disallowed/blocked the general modification of the "location /" aspect for any "kind: ingress" declared. So couple these together and in my case I'm running nginx:1 within the relevant pod that has the container with fast cgi, in addition to the Ingress NGINX stuff, and that nginx:1 container mounts the shared storage. It seems like it's probably a bad idea for me to mount things like this inside the "Controller" for the Ingress anyways, so perhaps its for the better. A lesson learned through multiple-days of hitting my HomeDC with various sized wrenches (and my keyboard). As for the "location /" aspect, I'm going to have to work around that, but I don't see why that's worth blocking. Anyways, posting this here so myself and maybe future humans can read it and be helped. Thanks to those in this thread for giving me stuff to try anyways! :) |
Hey Guys,
Sorry for posting a question here, however i've been stuck for 3 days looking around the internet for examples to fix my issue right now.
My issue is very similar to #4822, however i can't get it working.
My current working setup is 1 pod with 2 containers (1 php-fpm and 1 nginx pointing at it), and a service with type NodePort, accessible through external load balancer
It comes to a point where I need to add extra service and I want to use nginx ingress as a controller. However I always get 404 from nginx, no logs from php-fpm, and logs from ingress controller pod only shows 404 request. I'm on a total dead end atm.
Here's my usual nginx conf, notice because its laravel, its pointing to
/var/www/public
:Here's my setup for ingress controller:
What did i do wrong? has anyone manage to successfully setup FCGI straight to pods? I can't find any example from the internet at all. Please help
Thanks so much
The text was updated successfully, but these errors were encountered: