Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     location / {
  2.         # URLs to attempt, including pretty ones
  3.         try_files   $uri $uri/ /index.php?$query_string;
  4.         }
  5.     location /api/ {
  6.         # URLs to attempt, including pretty ones
  7.         try_files   $uri $uri/ /api/index.php?$query_string;
  8.         }
  9.     # PHP FPM configuration.
  10.     location ~* \.php$ {
  11.             fastcgi_pass                    unix:/run/php/php7.2-fpm.sock;
  12.             fastcgi_index                   index.php;
  13.             fastcgi_split_path_info         ^(.+\.php)(.*)$;
  14.             include                         fcgi.conf;
  15.             fastcgi_param PATH_INFO         $fastcgi_path_info;
  16.             fastcgi_param SCRIPT_FILENAME   $document_root$fastcgi_script_name;
  17.     }
  18.  
  19.     # We don't need .ht files with nginx.
  20.     location ~ /\.ht {
  21.             deny all;
  22.     }
  23.    
  24.     # Hide dot files/folders
  25.     location ~ .*/\. {
  26.             return 403;
  27.     }
  28.  
  29.     error_page 403 /403.html;
  30.    
  31.     # Set header expirations on per-project basis
  32.     location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
  33.             expires 365d;
  34.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement