parent
e4580676ce
commit
95e2cb5f12
|
@ -58,6 +58,7 @@ Socket:
|
||||||
- `redirect_from`: (O) Domain list to redirect to the first `name`. You can use this key to redirect non-www to www
|
- `redirect_from`: (O) Domain list to redirect to the first `name`. You can use this key to redirect non-www to www
|
||||||
- `location`: (O) Add new custom locations (it does not overwrite!)
|
- `location`: (O) Add new custom locations (it does not overwrite!)
|
||||||
- `more`: (O) Add more custom infos.
|
- `more`: (O) Add more custom infos.
|
||||||
|
- `upstream_params`: (O) Add upstream params (useful when you want to pass variables to PHP)
|
||||||
|
|
||||||
(O) : Optional
|
(O) : Optional
|
||||||
(M) : Mandatory
|
(M) : Mandatory
|
||||||
|
|
|
@ -24,7 +24,7 @@ server {
|
||||||
|
|
||||||
{% if item.more is defined and item.more is iterable %}
|
{% if item.more is defined and item.more is iterable %}
|
||||||
{% for line in item.more %}
|
{% for line in item.more %}
|
||||||
{{ item.more }}
|
{{ line }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,11 @@
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_pass php;
|
fastcgi_pass php;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
{# TODO: fastcgi_intercept_errors {{ item.php.intercept_errors | default('on') }}; #}
|
{% if item.upstream_params is defined and item.upstream_params is iterable %}
|
||||||
fastcgi_intercept_errors on;
|
{% for param in item.upstream_params %}
|
||||||
|
{{ param }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% if nginx_version.stdout | version_compare('1.6.1', 'lt') %}
|
{% if nginx_version.stdout | version_compare('1.6.1', 'lt') %}
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
- 'test2-alias.local'
|
- 'test2-alias.local'
|
||||||
template: '_base'
|
template: '_base'
|
||||||
more:
|
more:
|
||||||
- 'etag off;'
|
- 'autoindex off;'
|
||||||
location:
|
location:
|
||||||
'/test':
|
'/test':
|
||||||
- 'return 403;'
|
- 'return 403;'
|
||||||
|
@ -23,6 +23,8 @@
|
||||||
- 'return 404;'
|
- 'return 404;'
|
||||||
- name:
|
- name:
|
||||||
- 'test-php.local'
|
- 'test-php.local'
|
||||||
|
upstream_params:
|
||||||
|
- 'fastcgi_param FOO bar;'
|
||||||
redirect_from:
|
redirect_from:
|
||||||
- 'www.test-php.local'
|
- 'www.test-php.local'
|
||||||
template: '_php'
|
template: '_php'
|
||||||
|
|
Loading…
Reference in New Issue