You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1009 B

  1. server {
  2. server_name loc.wpstudio-new;
  3. listen 80;
  4. root $root;
  5. index index.html index.htm index.php;
  6. location / {
  7. try_files $uri $uri/ /index.php?$query_string;
  8. }
  9. location ~ \.php$ {
  10. fastcgi_pass php74;
  11. include fastcgi_params;
  12. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  13. }
  14. ## Begin - Security
  15. # deny all direct access for these folders
  16. location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
  17. # deny running scripts inside core system folders
  18. location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat|example)$ { return 403; }
  19. # deny running scripts inside user folder
  20. location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
  21. # deny access to specific files in the root folder
  22. location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }
  23. ## End - Security
  24. }