Advertisement
Guest User

safasfsaf

a guest
Feb 21st, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. # You may add here your
  2. # server {
  3. # ...
  4. # }
  5. # statements for each of your virtual hosts
  6. server {
  7. listen 188.72.245.198:80;
  8. server_name .xeksec.ru .xeka.ru;
  9. rewrite (.+) http://forum.xeksec.com$1;
  10. }
  11.  
  12. server {
  13. listen 188.72.245.198:80;
  14. server_name xeksec.com;
  15. access_log /var/log/nginx/xeksec.com.log;
  16.  
  17. location / {
  18. ssi on;
  19. proxy_pass http://127.0.0.1;
  20. }
  21. location @proxy {
  22. access_log /dev/null;
  23. #some trick for block XSpider
  24. if ( $http_user_agent ~* XSpider|Nessus ) {
  25. return 403;
  26. }
  27. proxy_pass http://127.0.0.1;
  28. }
  29.  
  30. location ~* ^.+\.flv$ {
  31. flv;
  32. root /www/$host;
  33. access_log /var/log/nginx/xeksec.com.log combined buffer=64k;
  34. error_log /var/log/nginx/xeksec.com.error.log;
  35. try_files $uri @proxy;
  36. expires 24h;
  37. add_header Cache-Control private;
  38. }
  39. location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js|avi|js|mov|mpeg|mpg|mp3|swf|vob|xml|3gp|torrent)$ {
  40. root /www/$host;
  41. ssi on;
  42. access_log /var/log/nginx/xeksec.com.log combined buffer=64k;
  43. error_log /var/log/nginx/xeksec.com.error.log;
  44. try_files $uri @proxy;
  45. expires 24h;
  46. add_header Cache-Control private;
  47. }
  48. }
  49.  
  50. server {
  51. listen 188.72.245.198:80;
  52. resolver 8.8.8.8;
  53. server_name forum.xeksec.com;
  54. root /www/forum.xeksec.com;
  55. access_log /var/log/nginx/forum.xeksec.com.log;
  56.  
  57. location / {
  58. ssi on;
  59. proxy_pass http://127.0.0.1;
  60. }
  61. location @proxy {
  62. access_log /dev/null;
  63. #some trick for block XSpider
  64. if ( $http_user_agent ~* XSpider|Nessus ) {
  65. return 403;
  66. }
  67. proxy_pass http://127.0.0.1;
  68. }
  69.  
  70. location ~* ^.+\.flv$ {
  71. flv;
  72. root /www/$host;
  73. access_log /var/log/nginx/xeksec.com.log combined buffer=64k;
  74. error_log /var/log/nginx/xeksec.com.error.log;
  75. try_files $uri @proxy;
  76. expires 24h;
  77. add_header Cache-Control private;
  78. }
  79. location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js|avi|js|mov|mpeg|mpg|mp3|swf|vob|xml|3gp|torrent)$ {
  80. root /www/$host;
  81. ssi on;
  82. access_log /var/log/nginx/xeksec.com.log combined buffer=64k;
  83. error_log /var/log/nginx/xeksec.com.error.log;
  84. try_files $uri @proxy;
  85. expires 24h;
  86. add_header Cache-Control private;
  87. }
  88. }
  89.  
  90. server {
  91. listen 188.72.245.198:443;
  92. ssl on;
  93. ssl_protocols TLSv1;
  94. ssl_prefer_server_ciphers on;
  95. ssl_certificate /etc/nginx/forum.xeksec.com.pem;
  96. ssl_certificate_key /etc/nginx/forum.xeksec.com.pem;
  97. resolver 8.8.8.8;
  98. server_name forum.xeksec.com;
  99. root /www/forum.xeksec.com;
  100. access_log /var/log/nginx/xeksec.com.log;
  101.  
  102. location / {
  103. ssi on;
  104. proxy_pass http://127.0.0.1;
  105. }
  106. location @proxy {
  107. access_log /dev/null;
  108. #some trick for block XSpider
  109. if ( $http_user_agent ~* XSpider|Nessus ) {
  110. return 403;
  111. }
  112. proxy_pass http://127.0.0.1;
  113. }
  114.  
  115. location ~* ^.+\.flv$ {
  116. flv;
  117. root /www/$host;
  118. access_log /var/log/nginx/xeksec.com.log combined buffer=64k;
  119. error_log /var/log/nginx/xeksec.com.error.log;
  120. try_files $uri @proxy;
  121. expires 24h;
  122. add_header Cache-Control private;
  123. }
  124. location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js|avi|js|mov|mpeg|mpg|mp3|swf|vob|xml|3gp|torrent)$ {
  125. root /www/$host;
  126. ssi on;
  127. access_log /var/log/nginx/xeksec.com.log combined buffer=64k;
  128. error_log /var/log/nginx/xeksec.com.error.log;
  129. try_files $uri @proxy;
  130. expires 24h;
  131. add_header Cache-Control private;
  132. }
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement