Giter Site home page Giter Site logo

drupal-nginx's People

Contributors

csandanov avatar drasgardian avatar fortis avatar patricksimpson avatar pprishchepa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drupal-nginx's Issues

Path to document root is hardcoded

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...

Running into an issue running update.php

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?

Too strict nginx location rules

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:

  • Do not restrict access to non drupal (module|inc|install|etc) files. It's the first time I see such a strict restriction in nginx
  • Introduce a new setting for nginx image to make location restriction more strict (as is right now) or less strict
  • Introduce opportunity to include custom nginx configs on top of pre-defined nginx config.

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.

NGINX_CONF_INCLUDE

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.

Self Signed Cert

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

Add redirect/map option

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

Bad Gateway error on bigger code changes

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

  • wodby/drupal-nginx:8-1.13-2.4.2

However, updating to wodby/drupal-nginx:8-1.13-3.0.1 doesn't help either, it produces the same thing.

Environment:

  • Ubuntu 16.04
  • Docker version 17.05.0-ce, build 89658be
  • docker-compose version 1.16.1, build 6d1ac219

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:

  • mariadb
  • php
  • nginx
  • mailhog
  • traefik

The site is D8 via the drupal-composer project.

Image styles not working

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

Question on Lua

Hi,

I noticed that You stopped using Lua.

Why is that ?

Regards,

Hans Nieuwenhuis

Can't use with PhotonOS

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.

Turn off caching

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.

Option to deliver images via Drupal, not directly

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.

no port in upstream after restart

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

Create multiple sitemaps impossible cause of NGinx rules

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.xml => OK as Drupal is able to resolve it
  • others: /sitemaps/1/sitemap.xml => KO
  • others: /sitemaps/2/sitemap.xml => KO
  • ...

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" ?

Compatibility with Statistics module

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;
}

Problem with Drupal 6 and clean URLs

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.

Add option to configure images folder

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?

Option to run Nginx on a different port

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.

NGINX_SERVER_EXTRA_CONF_FILEPATH

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.