vbulletin5.stpl 3.0 KB

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