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.

39 lines
1001B

  1. # Simple pillar setup
  2. # - snippet letsencrypt
  3. # - remove 'default' site
  4. # - create 'mysite' site
  5. nginx:
  6. snippets:
  7. letsencrypt.conf:
  8. - location ^~ /.well-known/acme-challenge/:
  9. - proxy_pass: http://localhost:9999
  10. server:
  11. config:
  12. http:
  13. ### module ngx_http_log_module example
  14. log_format: |-
  15. main '$remote_addr - $remote_user [$time_local] $status '
  16. '"$request" $body_bytes_sent "$http_referer" '
  17. '"$http_user_agent" "$http_x_forwarded_for"'
  18. servers:
  19. managed:
  20. default:
  21. deleted: True
  22. enabled: False
  23. config: {}
  24. mysite:
  25. enabled: True
  26. config:
  27. - server:
  28. - server_name: localhost
  29. - listen:
  30. - '80 default_server'
  31. - index: 'index.html index.htm'
  32. - location ~ .htm:
  33. - try_files: '$uri $uri/ =404'
  34. - include: 'snippets/letsencrypt.conf'