Comments (12)
Try adding:
upstream fastcgi_backend {
server 127.0.0.1:9000;
}
To the nginx default.conf
file.
from nginx-php-fpm.
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
from nginx-php-fpm.
Try adding it to the /etc/nginx/nginx.conf
file instead.
from nginx-php-fpm.
"upstream" directive is not allowed here in /etc/nginx/nginx.conf:13
from nginx-php-fpm.
Sorry, did you place it inside the http
block?
from nginx-php-fpm.
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;
}
from nginx-php-fpm.
Sorry. Quick question, are you in fact trying to use the craftcms-docker repo?
from nginx-php-fpm.
from nginx-php-fpm.
from nginx-php-fpm.
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.
from nginx-php-fpm.
from nginx-php-fpm.
Cool. I'll close this issue and update the other repo. Will also create a Craft 3 (Beta) branch too.
from nginx-php-fpm.
Related Issues (20)
- Dockerfile ADD statement HOT 2
- Installing PHP Modules HOT 2
- Permissions to edit files from the host
- Use debian slim as a base for a smaller image? HOT 2
- add module headers-more-nginx-module to hide the Server information in the header
- Readme is not beginner friendly
- Why are we using supervisord? HOT 1
- How to build dockerfile with php71 ?
- Composer upgrade on PHP 7.x images HOT 6
- index.php
- READMEs and Docker Hub out of date HOT 3
- Web Server Root Path HOT 1
- Laravel doesn't work HOT 2
- GPG keyserver receive failed: Connection timed out (Ubuntu)
- supervisord logs are written to filesystem
- Wrong Web Server Root Path & php.in path
- PHP don't see ENV variables HOT 1
- php 8.2 support
- Debian bookwork + php 8.3?
- Using an incorrect PGP key for the 81 image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-php-fpm.