Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- server_name example.com www.example.com;
- root /var/www/example.com;
- index index.php;
- try_files $uri /index.php;
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Frame-Options SAMEORIGIN;
- add_header X-Content-Type-Options nosniff;
- location ~* \.(woff2|woff|ttf|otf|svg)$ {
- add_header Access-Control-Allow-Origin *;
- }
- location / {
- autoindex on;
- if ($request_uri ~* ".(gif|jpe?g|png|webp|svg|mp4|mpeg)$") {
- expires 365d;
- access_log off;
- add_header Pragma public;
- add_header Cache-Control "public";
- break;
- }
- if ($request_uri ~* ".(css|js|pdf|swf)$") {
- expires 30d;
- access_log off;
- add_header Pragma public;
- add_header Cache-Control "public";
- break;
- }
- }
- gzip on;
- gzip_disable "msie6";
- gzip_vary on;
- gzip_proxied any;
- gzip_comp_level 6;
- gzip_buffers 16 8k;
- gzip_http_version 1.1;
- gzip_types application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/javascript text/plain text/xml;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement