Restructure how Nginx parser re-finds vhosts, and disable creating new server blocks. (#3528)

* Restructure add_server_directives to take a vhost as argument. This is the first step towards fixing vhost selection in nginx.

* Save path to vhost in file while parsing in get_vhosts().

* Disable creating a new server block when no names match.

* Make parser select vhost based on information in the vhost it found previously, rather than searching again for a match.

* Make add_server_directives update the passed vhost

* Update boulder config to pass test

* Add testing code for the _do_for_subarray function

* documentation and formatting updates
This commit is contained in:
Erica Portnoy
2016-09-26 13:13:29 -07:00
committed by Brad Warren
parent 3b9a87cd2f
commit 9f2dfc15fe
8 changed files with 134 additions and 127 deletions
@@ -52,6 +52,7 @@ http {
listen 8081;
# IPv6.
listen [::]:8081 default ipv6only=on;
server_name nginx.wtf;
root $root/webroot;