-
-
- ---
-
-
-
-
- nginx:
-
-
-
-
-
-
- install_from_repo: false
-
-
-
- install_from_phusionpassenger: false
-
-
- install_from_ppa: false
-
-
- ppa_version: 'stable'
-
-
- source_version: '1.10.0'
- source_hash: ''
-
-
-
-
-
-
-
-
-
-
- check_config_before_apply: false
-
-
-
- lookup:
- package: nginx-custom (can be a list)
- service: nginx
- webuser: www-data
- conf_file: /etc/nginx/nginx.conf
- server_available: /etc/nginx/sites-available
- server_enabled: /etc/nginx/sites-enabled
- server_use_symlink: true
-
-
- passenger_package: libnginx-mod-http-passenger
- passenger_config_file: /etc/nginx/conf.d/mod-http-passenger.conf
-
-
-
- rh_os_releasever: '6'
-
- gpg_check: true
-
- pid_file: /var/run/nginx.pid
-
-
-
- from_source: false
-
- source:
- opts: {}
-
- package:
- opts: {}
-
- service:
- enable: true
- opts: {}
-
-
-
-
-
-
-
- snippets:
- letsencrypt.conf:
- - location ^~ /.well-known/acme-challenge/:
- - proxy_pass: http://localhost:9999
- cloudflare_proxy.conf:
- - set_real_ip_from: 103.21.244.0/22
- - set_real_ip_from: 103.22.200.0/22
- - set_real_ip_from: 104.16.0.0/12
- - set_real_ip_from: 108.162.192.0/18
- blacklist.conf:
- - map $http_user_agent $bad_bot:
- - default: 0
- - '~*^Lynx': 0
- - '~*malicious': 1
- - '~*bot': 1
- - '~*crawler': 1
- - '~*bandit': 1
- - libwww-perl: 1
- - '~(?i)(httrack|htmlparser|libwww)': 1
- upstream_netdata_tcp.conf:
- - upstream netdata:
- - server: 127.0.0.1:19999
- - keepalive: 64
-
- streams:
- example_stream:
- - upstream some_upstream:
- - server: '10.0.0.1:8000'
- - server: '10.0.0.2:8000'
- - server:
- - listen: 7000
- - proxy_pass: some_upstream
-
- server:
-
-
- opts: {}
-
-
-
-
-
-
-
- config:
- include: 'snippets/letsencrypt.conf'
-
-
-
- source_path: salt://path_to_nginx_conf_file/nginx.conf
- worker_processes: 4
-
- load_module: modules/ngx_http_lua_module.so
-
-
- events:
- worker_connections: 1024
- http:
- sendfile: 'on'
- include:
-
-
- - /etc/nginx/mime.types
-
-
- log_format: |-
- main '$remote_addr - $remote_user [$time_local] $status '
- '"$request" $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"'
- access_log: []
-
-
-
-
- stream:
- upstream lb-1000:
- - server:
- - hostname1.example.com:1000
- - hostname2.example.com:1000
- upstream stream_backend:
- least_conn: ''
- 'server backend1.example.com:12345 weight=5': ~
- 'server backend2.example.com:12345 max_fails=2 fail_timeout=30s': ~
- 'server backend3.example.com:12345 max_conns=3': ~
- upstream dns_servers:
- least_conn: ''
- 'server 192.168.136.130:53': ~
- 'server 192.168.136.131:53': ~
- 'server 192.168.136.132:53': ~
- server:
- listen: 1000
- proxy_pass: lb-1000
- 'server ':
- listen: '53 udp'
- proxy_pass: dns_servers
- 'server ':
- listen: 12346
- proxy_pass: backend4.example.com:12346
-
-
- servers:
-
- disabled_postfix: .disabled
-
- symlink_opts: {}
-
- rename_opts: {}
-
- managed_opts: {}
-
-
- dir_opts: {}
-
-
- purge_servers_config: false
-
-
-
-
-
- managed:
-
-
-
- mysite:
-
-
- enabled: true
-
-
-
-
-
-
-
-
-
-
-
- requires: {}
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled_name: mysite.aint_on
-
- overwrite: true
-
-
-
-
-
- config:
-
-
-
-
-
-
-
-
-
-
-
-
- - server:
- - server_name: localhost
- - listen:
- - '80 default_server'
- - listen:
- - '443 ssl'
- - index: 'index.html index.htm'
- - location ~ .htm:
- - try_files: '$uri $uri/ =404'
- - test: something else
- - include: 'snippets/letsencrypt.conf'
-
-
- - server:
- - server_name: localhost
- - listen:
- - '80 default_server'
- - '443 ssl'
- - index: 'index.html index.htm'
- - location ~ .htm:
- - try_files: '$uri $uri/ =404'
- - test: something else
- - include: 'snippets/letsencrypt.conf'
-
-
-
- mysite2:
- enabled: true
- available_dir: /etc/nginx/sites-available
- enabled_dir: /etc/nginx/sites-enabled
- config:
-
-
- source_path: salt://path-to-site-file/mysite2
-
-
-
-
-
-
-
-
-
-
- http_options.conf:
- enabled: true
- available_dir: /usr/local/etc/nginx
- enabled_dir: /usr/local/etc/nginx
- config:
- - sendfile: 'on'
- - tcp_nopush: 'on'
- - tcp_nodelay: 'on'
- - send_iowait: 12000
-
-
- certificates_path: '/etc/nginx/ssl'
-
-
-
- certificates:
- 'www.example.com':
-
-
-
-
-
-
- public_cert: |
- -----BEGIN CERTIFICATE-----
- (Your Primary SSL certificate: www.example.com.crt)
- -----END CERTIFICATE-----
- -----BEGIN CERTIFICATE-----
- (Your Intermediate certificate: ExampleCA.crt)
- -----END CERTIFICATE-----
- -----BEGIN CERTIFICATE-----
- (Your Root certificate: TrustedRoot.crt)
- -----END CERTIFICATE-----
- private_key: |
- -----BEGIN RSA PRIVATE KEY-----
- (Your Private Key: www.example.com.key)
- -----END RSA PRIVATE KEY-----
-
- dh_param:
- 'mydhparam1.pem': |
- -----BEGIN DH PARAMETERS-----
- (Your custom DH prime)
- -----END DH PARAMETERS-----
- # or to generate one on-the-fly
- 'mydhparam2.pem':
- keysize: 2048
-
-
-
-
-
- passenger:
- passenger_root: /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
- passenger_ruby: /usr/bin/ruby
- passenger_instance_registry_dir: /var/run/passenger-instreg
-
- tofs:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- source_files:
- nginx_config_file_managed:
- - alt_nginx.conf
- passenger_config_file_managed:
- - alt_nginx.conf
- server_conf_file_managed:
- - alt_server.conf
- nginx_systemd_service_file:
- - alt_nginx.service
- nginx_snippet_file_managed:
- - alt_server.conf
|