Advertisement
Guest User

nginx.tpl

a guest
Oct 28th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. server {
  2. listen %ip%:%web_port%;
  3. server_name %domain_idn% %alias_idn%;
  4. root %docroot%;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/%domain%.log combined;
  7. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  8. error_log /var/log/nginx/domains/%domain%.error.log error;
  9.  
  10. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  11.  
  12. location / {
  13.  
  14. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  15. expires max;
  16. fastcgi_hide_header "Set-Cookie";
  17. fastcgi_hide_header "Set-Cookie";
  18. }
  19.  
  20. location ~ [^/]\.php(/|$) {
  21. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22. if (!-f $document_root$fastcgi_script_name) {
  23. return 404;
  24. }
  25.  
  26. fastcgi_pass %backend_lsnr%;
  27. fastcgi_index index.php;
  28. include /etc/nginx/fastcgi_params;
  29. }
  30. }
  31.  
  32. location /error/ {
  33. alias %home%/%user%/web/%domain%/document_errors/;
  34. }
  35.  
  36. location ~* "/\.(htaccess|htpasswd)$" {
  37. deny all;
  38. return 404;
  39. }
  40.  
  41. location /vstats/ {
  42. alias %home%/%user%/web/%domain%/stats/;
  43. include %home%/%user%/web/%domain%/stats/auth.conf*;
  44. }
  45.  
  46. include /etc/nginx/conf.d/phpmyadmin.inc*;
  47. include /etc/nginx/conf.d/phppgadmin.inc*;
  48. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement