Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. server {
  2. listen 80; ## listen for ipv4; this line is default and implied
  3. listen [::]:80 default ipv6only=on; ## listen for ipv6
  4.  
  5. root /inovace-server/public;
  6. index index.php index.html index.htm;
  7.  
  8. # Make site accessible from http://localhost/
  9. server_name _;
  10.  
  11. # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
  12. sendfile off;
  13.  
  14. # Add stdout logging
  15. error_log /dev/stdout info;
  16. access_log /dev/stdout;
  17.  
  18. # Add option for x-forward-for (real ip when behind elb)
  19. #real_ip_header X-Forwarded-For;
  20. #set_real_ip_from 172.16.0.0/12;
  21.  
  22. # block access to sensitive information about git
  23. location /.git {
  24. deny all;
  25. return 403;
  26. }
  27.  
  28. location / {
  29. # First attempt to serve request as file, then
  30. # as directory, then fall back to displaying a 404.
  31. #return 301 https://$host$request_uri;
  32. try_files $uri $uri/ /index.php?$query_string;
  33. }
  34.  
  35.  
  36. # pass the PHP scripts to FastCGI server listening on socket
  37. #
  38. location ~ \.php$ {
  39. try_files $uri =404;
  40. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  41. fastcgi_pass unix:/var/run/php-fpm.sock;
  42. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  43. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  44. fastcgi_index index.php;
  45. include fastcgi_params;
  46. }
  47.  
  48. location ~* \.(jpg|jpeg|gif|png|css|js|ico|webp|tiff|ttf|svg)$ {
  49. expires 5d;
  50. }
  51.  
  52. # deny access to . files, for security
  53. #
  54. location ~ /\. {
  55. log_not_found off;
  56. deny all;
  57. }
  58.  
  59. location ^~ /.well-known {
  60. allow all;
  61. auth_basic off;
  62. }
  63.  
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement