Advertisement
Guest User

nginx vhost for xl

a guest
Jun 9th, 2012
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. server {
  2. # error_log /var/log/nginx/vhost-error_log warn;
  3. listen 123.30.137.66:80;
  4. server_name xaluan.net mtvvui.com www.daiduong.com.au www.xaluan.net xaluan.com www.xaluan.com www.daiduongrestaurant.net veryzoo.com www.mtvvui.com www.xaluan.org www.veryzoo.com daiduongrestaurant.net xaluan.org daiduong.com.au;
  5. # access_log /usr/local/apache/domlogs/xaluan.net combined;
  6. root /home/xaluano/public_html;
  7. location / {
  8. if ($http_cache_control ~ "max-age=0") {
  9. set $bypass 1;
  10. }
  11.  
  12. location
  13. ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$
  14. {
  15. #root /home/xaluano/public_html;
  16. #proxy_cache wwwcache;
  17. #proxy_cache_valid 200 15m;
  18. #proxy_cache_bypass $bypass;
  19. expires 1d;
  20. #try_files $uri @backend;
  21. proxy_pass http://123.30.137.66:8081;
  22. }
  23. error_page 405 = @backend;
  24. add_header X-Cache "HIT from Backend";
  25. #proxy_set_header Server "Caching-Proxy";
  26. #add_header X-Cache-Vinahost "HIT from Backend";
  27. proxy_pass http://123.30.137.66:8081;
  28. include proxy.inc;
  29.  
  30. }
  31.  
  32.  
  33. location @backend {
  34. internal;
  35. proxy_pass http://123.30.137.66:8081;
  36. include proxy.inc;
  37. }
  38. location ~ .*\.(php|jsp|cgi|pl|py)?$ {
  39. #proxy_cache wwwcache;
  40. #proxy_cache_valid 200 15m;
  41.  
  42. proxy_pass http://123.30.137.66:8081;
  43. include proxy.inc;
  44. }
  45. location ~ /\.ht {
  46. deny all;
  47. }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement