Skip to content

Commit

Permalink
New vhost option: manage_local_content
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilien Mantel committed Oct 19, 2015
1 parent bf1b995 commit 710b3ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ You can see many examples in: [tests/test.yml](tests/test.yml).
- `more`: (O) Add more custom infos.
- `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
(M) : Mandatory
Expand Down
2 changes: 2 additions & 0 deletions templates/etc/nginx/sites-available/_base.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ server {
}

{% block template_local_content %}
{% if manage_local_content is defined and not manage_local_content %}
location = /favicon.ico {
expires 30d;
access_log off;
Expand All @@ -54,6 +55,7 @@ server {
expires 30d;
log_not_found off;
}
{% endif %}
{% endblock %}

{% if __location is iterable and __location | length > 0 %}
Expand Down
1 change: 1 addition & 0 deletions tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- 'test2-alias.local'
template: '_base'
override_try_files: '$uri $uri index.htm index.html'
manage_local_content: false
more:
- 'autoindex off;'
location:
Expand Down

0 comments on commit 710b3ad

Please sign in to comment.