EnderWinner

NGinx config for WordPress

Jan 28th, 2020
708
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         gzip on;
  2.         gzip_comp_level 4;
  3.         gzip_disable "msie6";
  4.         gzip_types
  5.         application/atom+xml
  6.         application/javascript
  7.         application/json
  8.         application/ld+json
  9.         application/manifest+json
  10.         application/rss+xml
  11.         application/vnd.geo+json
  12.         application/vnd.ms-fontobject
  13.         application/x-font-ttf
  14.         application/x-web-app-manifest+json
  15.         application/xhtml+xml
  16.         application/xml
  17.         font/opentype
  18.         image/bmp
  19.         image/svg+xml
  20.         image/x-icon
  21.         text/cache-manifest
  22.         text/css
  23.         text/plain
  24.         text/vcard
  25.         text/vnd.rim.location.xloc
  26.         text/vtt
  27.         text/x-component
  28.         text/x-cross-domain-policy;
  29.  
  30.    location / {
  31.     try_files $uri $uri/ /index.php$is_args$args;
  32.    }
  33.  
  34.    location ~ \.php$ {
  35.       include snippets/fastcgi-php.conf;
  36.       fastcgi_pass unix:/run/php/php-fpm.sock;
  37.    }
  38.  
  39.    location ~ /\.ht {
  40.       deny all;
  41.     }
  42.  
  43.    location ~ /\. {
  44.     deny all;
  45.    }
  46.  
  47.    location = /favicon.ico {
  48.     log_not_found off;
  49.     access_log off;
  50.    }
  51.  
  52.    location = /robots.txt {
  53.     allow all;
  54.     log_not_found off;
  55.     access_log off;
  56.    }
  57.  
  58.    location ~* /(?:uploads|files)/.*\.php$ {
  59.     deny all;
  60.    }
  61.  
  62.    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  63.                 expires max;
  64.                 log_not_found off;
  65.    }
  66.  
  67.    location ~* /(wp-config.php|readme.html|license.txt) {
  68.     deny all;
  69.    }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×