Advertisement
Guest User

Untitled

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