-
Notifications
You must be signed in to change notification settings - Fork 2k
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
FPM not working with nginx-proxy #1035
Comments
You'll need to use FastCGI (that container doesn't appear to do so by default); see https://github.com/nginx-proxy/nginx-proxy#fastcgi-backends |
Isn't that what the |
That needs to be on your Nginx container, not the FPM container (FPM is
always FastCGI).
|
Actually could you try with http://test.local/index.php directly? Not on a computer so cannot test. |
Okay, I moved that environment variable to the
Same results, whether the environment variable is on either container. (Blank screen when it's on the I also tried explicitly exposing port 9000, so my version: "3"
services:
proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- DEFAULT_HOST=test.local
- VIRTUAL_PROTO=fastcgi
fpm:
image: php:fpm
environment:
- VIRTUAL_HOST=test.local
ports:
- "9000:9000"
expose:
- "9000" Same results. When you get to a computer, you should be able to follow the steps I outlined in the original post and get the same result. If, however, it works for you, then perhaps there's something else going on in my development PC preventing it from working that I am unable to identify. |
That's wrong, |
Right, sorry, I misread; that was my bad. That being said, I think this conversation is much more appropriate at https://github.com/nginx-proxy/nginx-proxy, the Docker Community Forums, the Docker Community Slack, or Stack Overflow. |
(Closing in favor of nginx-proxy/nginx-proxy#1466) |
I am attempting to get nginx-proxy to work with the
php-fpm
version of this viafastcgi
. Unfortunately, I seem to be unable to do so. I'm sure the problem is just something simple that I don't know about.I have boiled it down to a very simple way to re-create it. Here's my
docker-compose.yml
file:I then drop in a simple
index.php
file by running:(It puts
web_
in front because this project is in a directory namedweb/
.)I also modify my
hosts
file to pointtest.local
to127.0.0.1
, so I can test it.However, every attempt to browse to
test.local
results in a blank white page.The logs for the
web_fpm_1
container show that nothing gets sent except a 200 response:What am I doing wrong?
The text was updated successfully, but these errors were encountered: