vbulletin5.tpl 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. location = /favicon.ico {
  10. log_not_found off;
  11. access_log off;
  12. }
  13. location = /robots.txt {
  14. allow all;
  15. log_not_found off;
  16. access_log off;
  17. }
  18. # legacy css being handled separate for performance
  19. location = /css\.php {
  20. rewrite ^ /core/css.php break;
  21. }
  22. # make install available from presentation
  23. location ^~ /install {
  24. rewrite ^/install/ /core/install/ break;
  25. }
  26. # any request to not existing item gets redirected through routestring
  27. location / {
  28. if (!-f $request_filename) {
  29. rewrite ^/(.*)$ /index.php?routestring=$1 last;
  30. }
  31. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  32. expires max;
  33. }
  34. }
  35. # make admincp available from presentation
  36. location ^~ /admincp {
  37. if (!-f $request_filename) {
  38. rewrite ^/admincp/(.*)$ /index.php?routestring=admincp/$1 last;
  39. }
  40. }
  41. # process any php scripts, not found gets redirected through routestring
  42. location ~ \.php$ {
  43. # handles legacy scripts
  44. if (!-f $request_filename) {
  45. rewrite ^/(.*)$ /index.php?routestring=$1 break;
  46. }
  47. fastcgi_split_path_info ^(.+\.php)(.*)$;
  48. fastcgi_pass %backend_lsnr%;
  49. fastcgi_index index.php;
  50. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  51. include fastcgi_params;
  52. fastcgi_param QUERY_STRING $query_string;
  53. fastcgi_param REQUEST_METHOD $request_method;
  54. fastcgi_param CONTENT_TYPE $content_type;
  55. fastcgi_param CONTENT_LENGTH $content_length;
  56. fastcgi_intercept_errors on;
  57. fastcgi_ignore_client_abort off;
  58. fastcgi_connect_timeout 60;
  59. fastcgi_send_timeout 180;
  60. fastcgi_read_timeout 180;
  61. fastcgi_buffers 256 16k;
  62. fastcgi_buffer_size 32k;
  63. fastcgi_temp_file_write_size 256k;
  64. include /etc/nginx/fastcgi_params;
  65. }
  66. error_page 403 /error/404.html;
  67. error_page 404 /error/404.html;
  68. error_page 500 502 503 504 /error/50x.html;
  69. location /error/ {
  70. alias %home%/%user%/web/%domain%/document_errors/;
  71. }
  72. location ~* "/\.(htaccess|htpasswd)$" {
  73. deny all;
  74. return 404;
  75. }
  76. location /vstats/ {
  77. alias %home%/%user%/web/%domain%/stats/;
  78. include %home%/%user%/web/%domain%/stats/auth.conf*;
  79. }
  80. include /etc/nginx/conf.d/phpmyadmin.inc*;
  81. include /etc/nginx/conf.d/phppgadmin.inc*;
  82. include /etc/nginx/conf.d/webmail.inc*;
  83. include %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
  84. }