Saltstack Official Nginx Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 line
1.4KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. # Simple pillar setup
  5. # - snippet letsencrypt
  6. # - remove 'default' site
  7. # - create 'mysite' site
  8. nginx:
  9. snippets:
  10. letsencrypt.conf:
  11. - location ^~ /.well-known/acme-challenge/:
  12. - proxy_pass: http://localhost:9999
  13. server:
  14. config:
  15. http:
  16. ### module ngx_http_log_module example
  17. log_format: |-
  18. main '$remote_addr - $remote_user [$time_local] $status '
  19. '"$request" $body_bytes_sent "$http_referer" '
  20. '"$http_user_agent" "$http_x_forwarded_for"'
  21. servers:
  22. managed:
  23. default:
  24. deleted: true
  25. enabled: false
  26. config: {}
  27. mysite:
  28. enabled: true
  29. config:
  30. - server:
  31. - server_name: localhost
  32. - listen:
  33. - '80 default_server'
  34. - index: 'index.html index.htm'
  35. - location ~ .htm:
  36. - try_files: '$uri $uri/ =404'
  37. - include: 'snippets/letsencrypt.conf'
  38. mysite_with_require:
  39. enabled: true
  40. config:
  41. - server:
  42. - server_name: with-deps
  43. - listen:
  44. - '80'
  45. - index: 'index.html index.htm'
  46. - location ~ .htm:
  47. - try_files: '$uri $uri/ =404'
  48. requires:
  49. file: created_to_test_dependencies
  50. dh_param:
  51. 'mydhparam2.pem':
  52. keysize: 2048