Advertisement
thisisvld

Untitled

Jan 21st, 2019
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. root@diavita-newprod:/etc/nginx/sites-enabled# cat bstest-symshop-ms.conf
  2. server {
  3. listen 80;
  4. # include snippets/https.conf;
  5. server_name bstest-symshop-ms.diavita-dev.com;
  6.  
  7. # App paths
  8. set $root_path '/home/diavita/symshop_bstest/web';
  9. root $root_path;
  10.  
  11. index index.php index.html index.htm;
  12.  
  13. # App settings
  14. charset utf-8;
  15. client_max_body_size 20M;
  16.  
  17. # Logging
  18. access_log /var/log/nginx/bstest-symshop-ds.diavita-dev.com.access.log;
  19. error_log /var/log/nginx/bstest-symshop-ds.diavita-dev.com.error.log error;
  20.  
  21. location / {
  22. autoindex off;
  23. index app.php;
  24. try_files $uri $uri/ /app.php?$query_string;
  25. }
  26. # PHP-FPM settings
  27. location ~ \.php$ {
  28. try_files $uri = 404;
  29.  
  30. include fastcgi_params;
  31. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  32. fastcgi_pass 127.0.0.1:9228;
  33. fastcgi_index app.php;
  34.  
  35. fastcgi_param HTTP_X_FILENAME $http_x_filename;
  36. fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  37.  
  38. # Prevent header too big errors
  39. fastcgi_buffer_size 128k;
  40. fastcgi_buffers 4 256k;
  41. fastcgi_busy_buffers_size 256k;
  42. }
  43.  
  44. # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
  45. # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
  46. location ~ /\. {
  47. deny all;
  48. }
  49. location /robots.txt {return 200 "User-agent: *\nDisallow: /\n";}
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement