mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-28 09:22:10 +07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
710b3ad53b | ||
|
|
bf1b9950cb | ||
|
|
050c16401f |
@@ -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!)
|
||||
- `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
|
||||
|
||||
@@ -30,7 +30,7 @@ server {
|
||||
|
||||
location / {
|
||||
{% block template_try_files %}
|
||||
try_files $uri $uri/ =404;
|
||||
try_files {{ override_try_files | default('$uri $uri/ =404') }};
|
||||
{% endblock %}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -54,6 +55,7 @@ server {
|
||||
expires 30d;
|
||||
log_not_found off;
|
||||
}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% if __location is iterable and __location | length > 0 %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block template_try_files %}
|
||||
try_files $uri $uri/ /index.php;
|
||||
try_files {{ override_try_files | default('$uri $uri/ /index.php') }};
|
||||
{% endblock %}
|
||||
|
||||
{% block template_upstream_location %}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
- 'test-alias.local'
|
||||
- 'test2-alias.local'
|
||||
template: '_base'
|
||||
override_try_files: '$uri $uri index.htm index.html'
|
||||
manage_local_content: false
|
||||
more:
|
||||
- 'autoindex off;'
|
||||
location:
|
||||
|
||||
Reference in New Issue
Block a user