Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D7 custom - decoupled upstreams & limit_zones #203

Closed
wants to merge 22 commits into from

Conversation

arielsalvo
Copy link

Hi!

I've been working on some changes to your D7 branch that you may be interested in and I'd like to hear your feedback.

I started by decoupling the upstream blocks from nginx.conf and the apps config files as I needed to be able to host different applications on the same nginx server while using different backends for each.
I also decoupled the zones (limit_conn_zone, limit_req_zone and microcache zones) so nginx.conf need not be modified when adding or removing one; I need this flexibility to use fail2ban.
I added a blockips.conf file which I also need for fail2ban (but can be used independently of it, of course), as well as map_mobile_useragent.conf which implements the change for the fastcgi_cache_key you documented in https://gist.github.com/perusio/1326701.

Still needs a bit of updating in the documentation of the example vhost but, basically, to select a backend for a vhost you'd just set the variable $upstream_id to the upstream name.

I'm not particularly crazy about the "proxy 0.0.0.0/0;" in the ACLs but I haven't seen any other solution to blocking access to status pages while behind a proxy (maybe it should default to /32 instead to be consistent with the real_ip config).

I've only tested this with PHP 5.5.9-1ubuntu4.5 (fpm-fcgi) and nginx/1.7.7 on Ubuntu 14.04.1, and only with drupal.conf but everything seems to be working as it should.

Looking forward to hearing from you

@arielsalvo arielsalvo closed this Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant