3 Commits
1.0.3 ... 1.0.4

Author SHA1 Message Date
Emilien Mantel
710b3ad53b New vhost option: manage_local_content 2015-10-19 09:39:51 +02:00
Emilien Mantel
bf1b9950cb Merge pull request #6 from HanXHX/tryfiles
Add feature: override_try_files on vhost
2015-10-17 08:14:12 +02:00
Emilien Mantel
050c16401f Add feature: override_try_files on vhost 2015-10-15 16:21:36 +02:00
4 changed files with 8 additions and 2 deletions

View File

@@ -61,6 +61,8 @@ You can see many examples in: [tests/test.yml](tests/test.yml).
- `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) - `upstream_params`: (O) Add upstream params (useful when you want to pass variables to PHP)
- `override_try_files`: (O) overrides default try\_files defined in template
- `manage_local_content`: (O) Boolean. Set to false if you don't want to manage local content (images, css...). This option is useless if you use proxy `template`
(O) : Optional (O) : Optional
(M) : Mandatory (M) : Mandatory

View File

@@ -30,7 +30,7 @@ server {
location / { location / {
{% block template_try_files %} {% block template_try_files %}
try_files $uri $uri/ =404; try_files {{ override_try_files | default('$uri $uri/ =404') }};
{% endblock %} {% endblock %}
} }
@@ -44,6 +44,7 @@ server {
} }
{% block template_local_content %} {% block template_local_content %}
{% if manage_local_content is defined and not manage_local_content %}
location = /favicon.ico { location = /favicon.ico {
expires 30d; expires 30d;
access_log off; access_log off;
@@ -54,6 +55,7 @@ server {
expires 30d; expires 30d;
log_not_found off; log_not_found off;
} }
{% endif %}
{% endblock %} {% endblock %}
{% if __location is iterable and __location | length > 0 %} {% if __location is iterable and __location | length > 0 %}

View File

@@ -4,7 +4,7 @@
{% endblock %} {% endblock %}
{% block template_try_files %} {% block template_try_files %}
try_files $uri $uri/ /index.php; try_files {{ override_try_files | default('$uri $uri/ /index.php') }};
{% endblock %} {% endblock %}
{% block template_upstream_location %} {% block template_upstream_location %}

View File

@@ -21,6 +21,8 @@
- 'test-alias.local' - 'test-alias.local'
- 'test2-alias.local' - 'test2-alias.local'
template: '_base' template: '_base'
override_try_files: '$uri $uri index.htm index.html'
manage_local_content: false
more: more:
- 'autoindex off;' - 'autoindex off;'
location: location: