Sha256: 3acc2bf4093d05565729e40db380e617f5876ce876899cfcf69e915ef78dfda6

Contents?: true

Size: 1.39 KB

Versions: 2

Compression:

Stored size: 1.39 KB

Contents

worker_processes 1;
error_log stderr;
pid nginx.pid;
daemon off;

events {
  worker_connections 768;
}

http {
  types_hash_max_size 2048;
  include mime.types;
  charset UTF-8;
  gzip on;
  gzip_comp_level 6;
  gzip_min_length 256;
  gzip_types text/plain text/css application/json application/javascript application/xml;
  gzip_proxied any;
  gzip_vary on;

  error_page 404 /404.html;

  server {
    listen 5000;
    server_name  _;
    root /usr/share/nginx/html;
    index index.html;
    port_in_redirect off;
    add_header X-Content-Type-Options "nosniff";

    location = / {
      try_files /index.html =404;
    }

    location / {
      rewrite ^/(.*)/$ /$1 permanent;

      try_files $uri $uri.html =404;
      expires 1h;
      error_page 404 /404.html;
    }

    location ~* \.(?:ico|gif|jpe?g|png|svg|webp)$ {
      expires 31536000s;
      add_header Cache-Control "public, max-age=31536000, immutable";
    }

    location ~* \.(css|js)$ {
        expires 31536000s;
        add_header Cache-Control "public, max-age=31536000, immutable";
        charset utf-8;
        gzip_static on;
    }

    location ~* \.woff2$ {
        expires 31536000s;
        add_header Cache-Control "public, max-age=31536000, immutable";
        types { font/woff2 woff2; }
        gzip off;
        add_header Vary Accept-Encoding;
    }

    location ~* \.webmanifest$ {
        charset off;
        gzip off;
    }
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
staticky-0.3.1 site_template/nginx.conf
staticky-0.3.0 site_template/nginx.conf