Comments (6)
Because you are overwriting the default.conf file in /etc/nginx/conf.d likely -
the STAGE command isn't really useful in that image other than to me, but it wont hurt to have it set.
The ./logs/nginx/error.log should also give a clue as to whats happening.
from docker-nginx-php-fpm.
Because you are overwriting the default.conf file in /etc/nginx/conf.d
I wanted to have a control to some kind of modifications in the feature. But I didn't change anything there. I haven't previously created any folder there, so the conf.d/
is a mirror of the container's folder.
The ./logs/nginx/error.log should also give a clue as to whats happening.
That's a weird thing. access.log and error.log are both empty.
I notice that there is no location / { }
directive in nginx.conf file. Is it relative to the issue?
from docker-nginx-php-fpm.
Strange, I can't seem to recreate it even doing what you are doing with the conf.d folder. I think this is probably a good opportunity to add some custom script functionality into the image. I'm quite busy right now but will put it on the list to support some sort of "snippets" function.
Hows about when you head inside the container and type curl localhost
from docker-nginx-php-fpm.
Hows about when you head inside the container and type curl localhost
Connection refused at port 80
But...
i tried commenting the line # - ./nginx_conf.d:/etc/nginx/conf.d
and it worked.
I noticed that when i try to link the folder /etc/nginx/conf.d
with a host folder (./nginx_conf.d
) these two folders are empty. Why this is happening ??
The two other volumes (html
and logs
) are created at the container's creation time and they contain the files existed inside the container. But this is not happening with the /etc/nginx/conf.d
folder. It is empty only when i try to mount it.
from docker-nginx-php-fpm.
I have a couple of files in nginx/conf.d - the biggest one that matters would be the default.conf file - I'm guessing if you are mapping it, and the folder is empty outside the container, it's overwriting the inside of it which is killing the config.
I have to figure out a way to be able to load additional configs for you - I agree this is not the best way forward, but I rarely if ever do something with this image other than serve basic apps, more so using it as a springboard to build other images.
On one of my other images I expanded on this and had a "conf.available" folder that let me use and insert certain templates, although it was very specific for the application. I'll need to think about this on how to implement without mucking too many things up.
At the very least you could in the meantime get a copy of the nginx/conf.d/default.conf from the working image, copy it out, make your changes to it and then mount the folder ./conf.d:/etc/nginx/conf.d:ro for the time being. The image won't fail per say just won't edit any of the files properly, I've done that a few times in a pinch.
from docker-nginx-php-fpm.
At the very least you could in the meantime get a copy of the nginx/conf.d/default.conf from the working image, copy it out, make your changes to it and then mount the folder ./conf.d:/etc/nginx/conf.d:ro for the time being
That's how i did it and it is indeed a working path.
from docker-nginx-php-fpm.
Related Issues (20)
- add a flag to disable php-fpm logs
- Server NGINX won't start up HOT 4
- opcache.max_accelerated_files=5413 HOT 3
- Nginx does not seem to be running - github codespace
- 02-pdo_pgsql.ini file not generated HOT 7
- Container cant start with nginx-php-fpm:8.2-alpine_edge-7.4.0 as base image HOT 2
- Want to modify php.ini HOT 2
- Add default index.php file for testing stock image HOT 1
- PHP_TIMEOUT doesn't update max_execution_time in php.ini HOT 5
- Install Openswoole HOT 2
- How to add scripts to crontab? HOT 3
- Trouble to use php-redis HOT 3
- Enable SMTP inside ENV variables, or docker-compose configuration?
- XDebug not available HOT 5
- PHP does not read environment variables HOT 2
- php-fpm doesn't start in PHP_FPM_CONTAINER_MODE=php-fpm HOT 5
- After update to 7.7.4 release getting `No such file or directory in log` HOT 2
- PHP 8.3 Debian image unavailable
- 5.6:alpine has issues with new nginx version (`events` directive missing) and php-fpm not starting properly HOT 3
- Security Vulnerability: NGINX Configuration Allows Unrestricted Access to PHP Files in Specified Directories HOT 5
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 docker-nginx-php-fpm.