Blame pillar/role/web_static.sls
|
Christian Boltz |
c48073 |
{% set websites = ['html5test', 'people', 'shop', 'static', 'studioexpress', 'lizards', 'www'] %}
|
|
Theo Chatzimichos |
ec9fc0 |
|
|
Theo Chatzimichos |
ec9fc0 |
include:
|
|
Theo Chatzimichos |
ec9fc0 |
- role.common.nginx
|
|
Theo Chatzimichos |
ec9fc0 |
|
|
Theo Chatzimichos |
ec9fc0 |
nginx:
|
|
Theo Chatzimichos |
ec9fc0 |
ng:
|
|
Theo Chatzimichos |
ec9fc0 |
servers:
|
|
Theo Chatzimichos |
ec9fc0 |
managed:
|
|
Theo Chatzimichos |
ec9fc0 |
{% for website in websites %}
|
|
Theo Chatzimichos |
ec9fc0 |
{{ website }}.opensuse.org.conf:
|
|
Theo Chatzimichos |
ec9fc0 |
config:
|
|
Theo Chatzimichos |
ec9fc0 |
- map $sent_http_content_type $expires:
|
|
Theo Chatzimichos |
ec9fc0 |
- text/css: 7d
|
|
Theo Chatzimichos |
ec9fc0 |
- image/x-icon: 90d
|
|
Theo Chatzimichos |
ec9fc0 |
- ~application/: 28d
|
|
Theo Chatzimichos |
ec9fc0 |
- ~font/: 28d
|
|
Theo Chatzimichos |
ec9fc0 |
- ~text/: 28d
|
|
Theo Chatzimichos |
ec9fc0 |
- ~image/: 28d
|
|
Theo Chatzimichos |
ec9fc0 |
- server:
|
|
Theo Chatzimichos |
ec9fc0 |
- server_name: {{ website }}.opensuse.org
|
|
Theo Chatzimichos |
ec9fc0 |
- listen:
|
|
Theo Chatzimichos |
ec9fc0 |
- 80
|
|
Theo Chatzimichos |
ec9fc0 |
{% if website == 'static' %}
|
|
Theo Chatzimichos |
ec9fc0 |
- default_server
|
|
Theo Chatzimichos |
ec9fc0 |
{% endif %}
|
|
Theo Chatzimichos |
ec9fc0 |
- root: /srv/www/vhosts/{{ website }}.opensuse.org
|
|
Theo Chatzimichos |
ec9fc0 |
- gzip_vary: 'on'
|
|
Theo Chatzimichos |
ec9fc0 |
- gzip_min_length: 1000
|
|
Theo Chatzimichos |
ec9fc0 |
- gzip_comp_level: 5
|
|
Theo Chatzimichos |
ec9fc0 |
- gzip_types:
|
|
Theo Chatzimichos |
ec9fc0 |
- text/plain
|
|
Theo Chatzimichos |
ec9fc0 |
- text/xml text/x-js
|
|
Theo Chatzimichos |
ec9fc0 |
- application/json
|
|
Theo Chatzimichos |
ec9fc0 |
- text/css
|
|
Theo Chatzimichos |
ec9fc0 |
- application/x-javascript
|
|
Theo Chatzimichos |
ec9fc0 |
- application/javascript
|
|
Theo Chatzimichos |
ec9fc0 |
- expires: $expires
|
|
Theo Chatzimichos |
ec9fc0 |
- location /:
|
|
Theo Chatzimichos |
ec9fc0 |
- index:
|
|
Theo Chatzimichos |
ec9fc0 |
- index.html
|
|
Theo Chatzimichos |
ec9fc0 |
- index.htm
|
|
Theo Chatzimichos |
ec9fc0 |
- location ~* \.(?:ttf|otf|eot|woff)$:
|
|
Theo Chatzimichos |
ec9fc0 |
- add_header: Access-Control-Allow-Origin "*"
|
|
Stasiek Michalski |
bfc7fb |
{% if website == 'static' %}
|
|
Stasiek Michalski |
303096 |
- location ~ ^/chat/:
|
|
Stasiek Michalski |
db6b37 |
- add_header: Access-Control-Allow-Origin "*"
|
|
Theo Chatzimichos |
ec9fc0 |
- location ~ ^/themes/:
|
|
Theo Chatzimichos |
ec9fc0 |
- autoindex: 'on'
|
|
Theo Chatzimichos |
ec9fc0 |
{% endif %}
|
|
Stasiek Michalski |
a8615c |
{% if website == 'www' %}
|
|
Stasiek Michalski |
a8615c |
- location ~ "^/\.well-known/":
|
|
Stasiek Michalski |
a8615c |
- add_header: Access-Control-Allow-Origin "*"
|
|
Stasiek Michalski |
a8615c |
{% endif %}
|
|
Theo Chatzimichos |
ec9fc0 |
- error_page: 405 = $uri
|
|
Theo Chatzimichos |
ec9fc0 |
- error_page: 405 =200 $uri
|
|
Theo Chatzimichos |
ec9fc0 |
- error_page: 500 502 503 504 /50x.html
|
|
Theo Chatzimichos |
ec9fc0 |
- location = /50x.html:
|
|
Theo Chatzimichos |
ec9fc0 |
- root: /srv/www/htdocs
|
|
Christian Boltz |
dac778 |
- access_log: /var/log/nginx/{{ website }}.access.log combined
|
|
Christian Boltz |
dac778 |
- error_log: /var/log/nginx/{{ website }}.error.log
|
|
Theo Chatzimichos |
ec9fc0 |
enabled: True
|
|
Theo Chatzimichos |
ec9fc0 |
{% endfor %}
|
|
Christian Boltz |
9c011c |
|
|
Christian Boltz |
9c011c |
profile:
|
|
Christian Boltz |
9c011c |
web_static:
|
|
Christian Boltz |
c59b75 |
ssh_pubkey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJVddqh51YNoPglOnSZ9BpYH1nXzBV5ahbu0yncyL+6s web_static@salt'
|
|
Christian Boltz |
9c011c |
websites: {{ websites }}
|