Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. erver {
  2. listen 80;
  3. server_name _;
  4. root /var/www/mysite/web;
  5.  
  6.  
  7. index index.php;
  8. # add_header Access-Control-Allow-Origin *;
  9.  
  10.  
  11. # serve static files directly
  12. location ~* .(jpg|jpeg|gif|css|png|js|ico|html)$ {
  13. access_log off;
  14. expires max;
  15. log_not_found off;
  16. }
  17.  
  18.  
  19. location / {
  20. # add_header Access-Control-Allow-Origin *;
  21. try_files $uri $uri/ /index.php?$query_string;
  22. }
  23.  
  24. location ~* .php$ {
  25. try_files $uri = 404;
  26. fastcgi_split_path_info ^(.+.php)(/.+)$;
  27. fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  28. fastcgi_index index.php;
  29. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30. include fastcgi_params;
  31.  
  32. location ~ /.ht {
  33. deny all;
  34.  
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement