server { listen 80; server_name daram.in www.daram.in; return 301 https://$host$request_uri; } server { listen 443 ssl; http2 on; server_name daram.in www.daram.in; root /var/www/html; index index.htm index.html index.php index.jsp index.aspx; ssl_certificate "/etc/letsencrypt/live/daram.in/fullchain.pem"; ssl_certificate_key "/etc/letsencrypt/live/daram.in/privkey.pem"; server_tokens off; client_max_body_size 256M; gzip on; location ~* \./(png|jpg|jpeg|webm|webp|gif|ico|svg|mp4|ttf|otf|eot|woff|woff2)$ { expires 1d; add_header Cache-Control "public, no-transform"; } location ~* \.(js|css)$ { expires 1d; add_header Cache-Control "public, no-transform"; } # On-disk Brotli-precompressed data files should be served with compression enabled: location ~ .+\.(data|symbols\.json)\.br$ { # Because this file is already pre-compressed on disk, disable the on-demand compression on it. # Otherwise nginx would attempt double compression. gzip off; add_header Content-Encoding br; default_type application/octet-stream; } # On-disk Brotli-precompressed JavaScript code files: location ~ .+\.js\.br$ { gzip off; # Do not attempt dynamic gzip compression on an already compressed file add_header Content-Encoding br; default_type application/javascript; } # On-disk Brotli-precompressed WebAssembly files: location ~ .+\.wasm\.br$ { gzip off; # Do not attempt dynamic gzip compression on an already compressed file add_header Content-Encoding br; # Enable streaming WebAssembly compilation by specifying the correct MIME type for # Wasm files. default_type application/wasm; } # On-disk gzip-precompressed data files should be served with compression enabled: location ~ .+\.(data|symbols\.json)\.gz$ { gzip off; # Do not attempt dynamic gzip compression on an already compressed file add_header Content-Encoding gzip; default_type application/octet-stream; } # On-disk gzip-precompressed JavaScript code files: location ~ .+\.js\.gz$ { gzip off; # Do not attempt dynamic gzip compression on an already compressed file add_header Content-Encoding gzip; default_type application/javascript; } # On-disk gzip-precompressed WebAssembly files: location ~ .+\.wasm\.gz$ { gzip off; # Do not attempt dynamic gzip compression on an already compressed file add_header Content-Encoding gzip; # Enable streaming WebAssembly compilation by specifying the correct MIME type for # Wasm files. default_type application/wasm; } location ~ .+\.unityweb$ { gzip off; # Do not attempt dynamic gzip compression on an already compressed file add_header Content-Encoding brotli; default_type application/octet-stream; } }