wodby / drupal-nginx Goto Github PK
View Code? Open in Web Editor NEWARCHIVED: merged to https://github.com/wodby/nginx
ARCHIVED: merged to https://github.com/wodby/nginx
First of all, I'd like to thank you guys for this contribution!
Right now, document root for server is hard coded: root /var/www/html/;
. Are there plans to make it configurable?
I was playing with docker4drupal and notices that there is PHP_DOCROOT: web
environment variable defined in docker-compose.yml
and seems it's not used here...
Not sure if anyone else has run into this problem, but I had to update my nginx config location block for update.php to the following:
location ~* ^/update.php {
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param SCRIPT_NAME /update.php;
fastcgi_param SCRIPT_FILENAME $document_root/update.php;
fastcgi_pass backend;
}
Any one else running into to issues running update.php without this?
Hi guys,
First of all thanks for all your hard work on docker4drupal, it's really great. Our team tries it out with a very positive outcome.
One thing I'd like to mention here which makes local development a bit annoying is too strict configuration of nginx location. For example, if I put a custom php file in the root, then I can't access via web. The same applies to text files, etc.
I do understand that probably you consider this image as ready for both development & production. However, development process is quite unpredictable, and you never know if the next project you get will include custom files which has to be accessed or not. So I propose to consider several options for implementation:
I know we could always inherit an image from yours and build on top, but it's much easier to include this small amend right in the main image. I'm sure lots of developers faced or will face the same issue, so why don't we make this image better together :)
Cheers,
Spleshka.
I am trying to use NGINX_CONF_INCLUDE to set a custom nginx config to be used with drupal 6, however it does not seem to be working as expected.
I have copied the file from /etc/nginx/conf.d to my docroot and created an alias in my docker-compose.yml file e.g.
NGINX_CONF_INCLUDE: /var/www/html/d6_nginx.conf
After restarting the container, it does not seem to be picking up on my replacement file.
This is reported several times in the Drush issue queue (e.g. drush-ops/drush#2415) and it would be great if the drupal-nginx image for Drupal 7 could come with Drush 8.1.4
I think have the container support a self signed certificate can be helpful for front end development. I ran into an issue with a Google API needing requests to be secure. I think having a self signed cert to force the browser to make calls over HTTPS will solve the problem
Hi!
I'm using this image, obviously with docker4-drupal stack, for a migration site from d7 to d8.
I've to implenents some redirect in nginx.
It could be useful to add an option (a file to include with volumes) to add a map file for redirects.
What do you think?
Thanks,
Sergio
Hi!
Whenever I try to do a major code update (composer update drupal/core for example) my sites just return 502 and I have to stop the environment, docker rm the nginx container and up it again. This happens on multiple projects.
Our used image
However, updating to wodby/drupal-nginx:8-1.13-3.0.1 doesn't help either, it produces the same thing.
Environment:
Also, it doesn't matter if the composer update happens inside the container or on the host, both tend to result in this error.
Additionally, I only have these services enabled:
The site is D8 via the drupal-composer project.
Hey guys,
first of all my compliments for this great collection of Docker images.
Now to the issue / solution: the block
location ~* /system/files/
is missing
include fastcgi_params;
Thus image styles won't be generated. The backend responds with 200 OK but sends an empty body. It looked to me as if PHP assumed this is a HEAD request without this. Adding this line however (as it's added to all other fcgi pass directives in the script) fixes the issue.
Best
Thiemo
Hi,
I noticed that You stopped using Lua.
Why is that ?
Regards,
Hans Nieuwenhuis
I did not manage to use this image with PhotonOS (https://github.com/vmware/photon) in a virtual machine. Neither with Photon installed in minimal nor full version. I always got "File not found".
With the image vmwarecna/nginx the webserver will respond immediately.
Is there is away to easily turn off caching completely? for example when there is css or js file is updated. i have to always use ctrl + f5 to pick the new files or resources.
There appears to be an issue with drupal8.conf. In a D8 instance, browsing to /update.php, and clicking on the "Continue" button gives a 404. I found a nginx conf file that supports D8 update.php at https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
Currently, assets are delivered directly by Nginx because of this location:
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg|svgz)xxx$ {
access_log off;
expires 30d;
tcp_nodelay off;
open_file_cache max=3000 inactive=120s;
open_file_cache_valid 45s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
location ~* ^.+\.svgz$ {
gzip off;
add_header Content-Encoding gzip;
}
}
It would be great to get an environment variable that allows to disable that for images and deliver those by @drupal instead.
Use case: we are using docker4drupal in development environments and together with a module called stage_file_proxy it is possible to grab all the images from the live site instead of copying them all to each of the dev environments. But that only works if Drupal gets involved in delivering the images, otherwise it can't react to the request.
everything start fine except nginx dies with code exit 1
and gets this error message
nginx_1 | nginx: [emerg] no port in upstream "backend" in /etc/nginx/conf.d/drupal.conf:23
Hi.
I currently work on a Drupal 8 site, and I use Simple XML sitemap module to get a sitemap.
As there are a lot of links in it, i divided it, using a feature proposed by these module.
When I do so, I obtain 1 index sitemap and several sitemaps. Here is URL pattern :
Index sitemap is OK, as you describe it in drupal.conf.tpl file, but for others, Nginx render a 404 before Drupal can resolve it using his route system..
Wouldn't it be great if Drupal could deal with all URLs ending with "sitemap.xml" ?
Hi. When using cached pages in Drupal, one can configure the Statistics module (D7) to update its counter using an Ajax call to the file:
/modules/statistics/statistics.php
Right now, this functionality is broken when using drupal-nginx because trying to access the file always throws an 404 error, I suspect due to these lines in the drupal.conf file:
location ~* ^.+\.php$ {
return 404;
}
Just ran into a problem with the image wodby/drupal-nginx:6-1.10-2.0.0 and clean URLs in a Drupal 6 installation. Regardless of what I put in as the path, I always get the front page being delivered. The logs in nginx and php containers are not showing any errors.
When I put $conf['clean_url'] = 0;
into my settings.php, then I can properly navigate the site.
I'm not an expert for Nginx and therefore thought I'd better ask here, hoping that there is an easy resolution for this.
I'm finding some Drupal pages give me a 502 error which I can resolve by increasing nginx fastcgi_buffers to:
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
Statistics use special endpoint to speed-up access
The file to expose is http://cgit.drupalcode.org/drupal/tree/core/modules/statistics/statistics.php
Just started happening today, in the last few hours.
nginx_1 | nginx: [emerg] no port in upstream "backend" in /etc/nginx/conf.d/drupal.conf:22
When we startup our nginx instance.
Subj. I need to set up url redirect for images to production domain
E.g. see EntityResourceTestBase
https://github.com/wodby/drupal-nginx/blob/master/8/1.13/drupal.conf.tpl#L14 is the issue
Currently we can't change the path of files folder it always look for files/styles/ when try to generate image styles for example
Can we make it configurable?
Hi,
If I'm using varnish, I'd possibly run varnish on port 80 and nginx in a different port.
The current setup does not expose the option to change nginx port. Can this be a possible enhancement? I'd love to contribute this.
Adding the following to:
NGINX_SERVER_EXTRA_CONF_FILEPATH: nginx_extra.conf
Contents of nginx_extra.conf
location ~* /sites/all/libraries/licenses/ {
access_log {{ getenv "NGINX_STATIC_CONTENT_ACCESS_LOG" "off" }};
expires {{ getenv "NGINX_STATIC_CONTENT_EXPIRES" "30d" }};
try_files $uri @drupal;
}
I get error:
nginx: [emerg] "location" directive is not allowed here in /etc/nginx/conf.d/nginx_extra.conf:1
All I can find is that it is not "in the server {} but I believe it is based on where it is included.
nginx complains when uploading a 14mb file. Is there a way to increase this value?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.