Sha256: 2be096181af3ad1c9baf99be4d14df39f12151217a3dc6bf13124314ad6dab45

Contents?: true

Size: 1.47 KB

Versions: 2

Compression:

Stored size: 1.47 KB

Contents

server {

{%- if 'secure' in pillar['roles'] %}
	listen 880 ssl;
        ssl_certificate /etc/pki/self_signed/certs/localhost.crt;
        ssl_certificate_key /etc/pki/self_signed/certs/localhost.key;

        error_page 497  https://$http_host$request_uri;

        satisfy all;
{%- else %}
	listen 880;
        satisfy any;
{%- endif %}

{%- if ('secure' in pillar['roles']) or pillar['admin_password'] %}
        auth_basic           "Restricted site";
        auth_basic_user_file /etc/nginx/admin.d/htpasswd;
{%- endif %}

        # Allow ssh (localhost)
        allow   127.0.0.0/8;
        # Allow private IP range (virtualbox)
        allow   10.0.0.0/8;
        allow   172.16.0.0/12;
        allow   192.168.0.0/16;
        # todo: add list of dynamic ips - of admins
        deny    all;

        #listen   [::1]:880 default ipv6only=on; ## listen for ipv6
        index index.php index.html index.htm;

        server_name localhost;
	client_max_body_size 20M;

	root {{ pillar['www_dir'] }}/admin;

        location ~ \.php$ {
              fastcgi_split_path_info ^(.+\.php)(/.+)$;
              #   # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
              #
              #   # With php5-cgi alone:
              #   fastcgi_pass 127.0.0.1:9000;
              #   # With php5-fpm:
              fastcgi_pass unix:/var/run/php5-fpm.sock;
              fastcgi_index index.php;
              include fastcgi_params;
          }

        include /etc/nginx/admin.d/*.conf;

}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
salted-rails-0.0.9 salt/www/nginx/etc/nginx/sites-available/admin.conf
salted-rails-0.0.8 salt/www/nginx/etc/nginx/sites-available/admin.conf