4 Commits
1.0.0 ... 1.0.2

Author SHA1 Message Date
Emilien Mantel
95e2cb5f12 Fix more params and add upstream params 2015-09-21 16:29:14 +02:00
Emilien Mantel
e4580676ce Fix indent on phalcon vhost 2015-09-09 17:51:17 +02:00
Emilien Mantel
9da1673293 Add "more" info on vhost 2015-09-09 17:44:53 +02:00
Emilien Mantel
ed5b7bf2cf Phalcon can manage raw args now 2015-09-09 17:22:49 +02:00
5 changed files with 20 additions and 5 deletions

View File

@@ -55,8 +55,10 @@ Socket:
- `template`: (M) template used to create vhost - `template`: (M) template used to create vhost
- `enable`: (O) Enable the vhost (default is true) - `enable`: (O) Enable the vhost (default is true)
- `delete`: (O) Delete the vhost (default is false) - `delete`: (O) Delete the vhost (default is false)
- `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`: Add new custom locations (it does not overwrite!) - `location`: (O) Add new custom locations (it does not overwrite!)
- `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

View File

@@ -22,6 +22,12 @@ server {
index {{ item.index | default('index.html index.htm') }}; index {{ item.index | default('index.html index.htm') }};
{% endblock %} {% endblock %}
{% if item.more is defined and item.more is iterable %}
{% for line in item.more %}
{{ line }}
{% endfor %}
{% endif %}
location / { location / {
{% block template_try_files %} {% block template_try_files %}
try_files $uri $uri/ =404; try_files $uri $uri/ =404;

View File

@@ -1,5 +1,5 @@
{% extends "_php.j2" %} {% extends "_php.j2" %}
{% block template_try_files %} {% block template_try_files %}
try_files $uri $uri/ /index.php?_url=$uri; try_files $uri $uri/ /index.php?_url=$uri$is_args&$args;
{% endblock %} {% endblock %}

View File

@@ -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 %}

View File

@@ -14,6 +14,8 @@
- 'test-alias.local' - 'test-alias.local'
- 'test2-alias.local' - 'test2-alias.local'
template: '_base' template: '_base'
more:
- 'autoindex off;'
location: location:
'/test': '/test':
- 'return 403;' - 'return 403;'
@@ -21,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'