Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. server {
  3.     server_name igentu.com;
  4.     listen 80;
  5.    
  6.     location / {
  7.         index index.html index.php;
  8.         try_files $uri $uri/  @kek;
  9.        
  10.         expires 30d;
  11.     }
  12.  location ~* \.(eot|ttf|woff|woff2|svg)$ {
  13.     add_header Access-Control-Allow-Origin *;
  14. }
  15.    
  16.     location ^~ /app/                { deny all; }
  17.     location ^~ /includes/           { deny all; }
  18.     location ^~ /lib/                { deny all; }
  19.     location ^~ /media/downloadable/ { deny all; }
  20.     location ^~ /pkginfo/            { deny all; }
  21.     location ^~ /report/config.xml   { deny all; }
  22.     location ^~ /var/                { deny all; }
  23.  
  24.     location /var/export/ {
  25.         auth_basic           "Restricted";
  26.         auth_basic_user_file htpasswd;
  27.         autoindex            on;
  28.     }
  29.  
  30.     location  /. {
  31.      
  32.         return 404;
  33.     }
  34.  
  35.     location @handler {
  36.         rewrite / /index.php;
  37.     }
  38.  
  39.  location @kek {
  40.  rewrite ^(.*)$ /$1.php;
  41.  }
  42.     location ~ .php/ {
  43.         rewrite ^(.*.php)/ $1 last;
  44.     }
  45.  
  46.     location ~ .php$ {
  47.         if (!-e $request_filename) { rewrite / /index.php last; }
  48.  
  49.         expires        off;
  50.         fastcgi_pass  unix:/run/php/php7.0-fpm.sock;
  51.  
  52.         fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
  53.         fastcgi_param  MAGE_RUN_CODE en;
  54.         fastcgi_param  MAGE_RUN_TYPE store;
  55.         include        fastcgi_params;
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement