Closed ghost closed 7 years ago
Try adding:
upstream fastcgi_backend {
server 127.0.0.1:9000;
}
To the nginx default.conf
file.
Yeah I saw that in a thread somewhere, but I'm getting this:
"upstream" directive is not allowed here in /etc/nginx/conf.d/default.conf
which shuts nginx down
Try adding it to the /etc/nginx/nginx.conf
file instead.
"upstream" directive is not allowed here in /etc/nginx/nginx.conf:13
Sorry, did you place it inside the http
block?
No longer getting that error on nginx startup, but its still not able to connect to the php7.0-fpm.sock
file
web_1 | 2017/04/13 22:15:42 [crit] 18#18: *1 connect() to unix:/run/php/php7.0-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "localhost"
web_1 | 2017/04/13 22:15:42 [error] 18#18: *1 open() "/usr/share/nginx/html/50x.html" failed (2: No such file or directory), client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock", host: "localhost"
Here's the contents of my etc/nginx/nginx.conf
file:
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
upstream fastcgi_backend {
server 127.0.0.1:9000;
}
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
Sorry. Quick question, are you in fact trying to use the craftcms-docker repo?
I repurposed that repo to work with Craft 3--its a work in progress. We're having all sorts of dependency issues and my machine doesn't have enough storage for vagrant, so I'm trying to make Docker work.
So far, after beta12, its working really great. I get all sorts of "unknown errors" in the dashboard on craft3 when I try to run it on my system configs, but my docker containers run great.
Why do you ask?
-- Travis Meyer
(sent via mobile)
On Apr 15, 2017, 16:36 -0700, Colin Wilson notifications@github.com, wrote:
Sorry. Quick question, are you in fact trying to use the craftcms-docker (https://github.com/wyveo/craftcms-docker) repo?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/wyveo/nginx-php-fpm/issues/1#issuecomment-294324012), or mute the thread (https://github.com/notifications/unsubscribe-auth/AG2NRAxGInMRaVFFK5gx49LFqplVukPuks5rwVRvgaJpZM4M8IHE).
Sorry I just realized you're not Brandon from pixel and tonic (been communicating back and forth with him), I actually fixed this issue! I'll put some notes in the issue thread and close it out asap
Thanks Colin!
-- Travis Meyer
(sent via mobile)
On Apr 15, 2017, 16:36 -0700, Colin Wilson notifications@github.com, wrote:
Sorry. Quick question, are you in fact trying to use the craftcms-docker (https://github.com/wyveo/craftcms-docker) repo?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/wyveo/nginx-php-fpm/issues/1#issuecomment-294324012), or mute the thread (https://github.com/notifications/unsubscribe-auth/AG2NRAxGInMRaVFFK5gx49LFqplVukPuks5rwVRvgaJpZM4M8IHE).
I noticed that you said you ran the sudo compose-build up
command, and also that that repo's default.conf
is configured for php 7.0.x not php 7.1 which is the image it's pulling.
I'll update it soon.
Yep, thats the fix exactly
-- Travis Meyer
(sent via mobile)
On Apr 15, 2017, 16:59 -0700, Colin Wilson notifications@github.com, wrote:
I noticed that you said you ran the sudo compose-build up command, and also that that repo's default.conf is configured for php 7.0.x not php 7.1 which is the image it's pulling.
I'll update it soon.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/wyveo/nginx-php-fpm/issues/1#issuecomment-294324783), or mute the thread (https://github.com/notifications/unsubscribe-auth/AG2NRDM59F1pL_BvjEsDiOgUYK6aVYt4ks5rwVnwgaJpZM4M8IHE).
Cool. I'll close this issue and update the other repo. Will also create a Craft 3 (Beta) branch too.
Hey,
This is great, just can't seem to get around this issue. After running
sudo compose-build up
and opening my localhost, I get this error:Any ideas what might be going on?