Saltstack Official Nginx Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

102 行
3.6KB

  1. nginx:
  2. install_from_source: True
  3. use_upstart: True
  4. user_auth_enabled: True
  5. with_luajit: False
  6. with_openresty: True
  7. set_real_ips: # NOTE: to use this, nginx must have http_realip module enabled
  8. from_ips:
  9. - 10.10.10.0/24
  10. real_ip_header: X-Forwarded-For
  11. modules:
  12. headers-more:
  13. source: http://github.com/agentzh/headers-more-nginx-module/tarball/v0.21
  14. source_hash: sha1=dbf914cbf3f7b6cb7e033fa7b7c49e2f8879113b
  15. # ========
  16. # nginx.ng
  17. # ========
  18. nginx:
  19. ng:
  20. # These are usually set by grains in map.jinja
  21. lookup:
  22. package: nginx-custom
  23. service: nginx
  24. webuser: www-data
  25. conf_file: /etc/nginx/nginx.conf
  26. vhost_available: /etc/nginx/sites-available
  27. vhost_enabled: /etc/nginx/sites-enabled
  28. vhost_use_symlink: True
  29. # Source compilation is not currently a part of nginx.ng
  30. from_source: False
  31. package:
  32. opts: {} # this partially exposes parameters of pkg.installed
  33. service:
  34. enable: True # Whether or not the service will be enabled/running or dead
  35. opts: {} # this partially exposes parameters of service.running / service.dead
  36. server:
  37. opts: {} # this partially exposes file.managed parameters as they relate to the main nginx.conf file
  38. # nginx.conf (main server) declarations
  39. # dictionaries map to blocks {} and lists cause the same declaration to repeat with different values
  40. config:
  41. worker_processes: 4
  42. pid: /run/nginx.pid
  43. events:
  44. worker_connections: 768
  45. http:
  46. sendfile: 'on'
  47. include:
  48. - /etc/nginx/mime.types
  49. - /etc/nginx/conf.d/*.conf
  50. vhosts:
  51. disabled_postfix: .disabled # a postfix appended to files when doing non-symlink disabling
  52. symlink_opts: {} # partially exposes file.symlink params when symlinking enabled sites
  53. rename_opts: {} # partially exposes file.rename params when not symlinking disabled/enabled sites
  54. managed_opts: {} # partially exposes file.managed params for managed vhost files
  55. dir_opts: {} # partially exposes file.directory params for site available/enabled dirs
  56. # vhost declarations
  57. # vhosts will default to being placed in vhost_available
  58. managed:
  59. mysite: # relative pathname of the vhost file
  60. # may be True, False, or None where True is enabled, False, disabled, and None indicates no action
  61. dir: /tmp # an alternate directory (not sites-available) where this vhost may be found
  62. disabled_name: mysite.aint_on # an alternative disabled name to be use when not symlinking
  63. enabled: True
  64. # May be a list of config options or None, if None, no vhost file will be managed/templated
  65. # Take server directives as lists of dictionaries. If the dictionary value is another list of
  66. # dictionaries a block {} will be started with the dictionary key name
  67. config:
  68. - server:
  69. - server_name: localhost
  70. - listen:
  71. - 80
  72. - default_server
  73. - index:
  74. - index.html
  75. - index.htm
  76. - location ~ .htm:
  77. - try_files:
  78. - $uri
  79. - $uri/ =404
  80. - test: something else
  81. # The above outputs:
  82. # server {
  83. # server_name localhost;
  84. # listen 80 default_server;
  85. # index index.html index.htm;
  86. # location ~ .htm {
  87. # try_files $uri $uri/ =404;
  88. # test something else;
  89. # }
  90. # }