Advertisement
aka40

vhost config

Jan 25th, 2014
1,922
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. server {
  2. error_log /var/log/nginx/vhost-error_log warn;
  3. listen 199.xxx.xxx.xx:xx;
  4. server_name mysite.com www.mysite.com;
  5. access_log /usr/local/apache/domlogs/mysite.com-bytes_log bytes_log;
  6. access_log /usr/local/apache/domlogs/mysite.com combined;
  7. root /home/cpanel-user-name/public_html;
  8.  
  9. location / {
  10. location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
  11. expires 1d;
  12. try_files $uri @backend;
  13. }
  14. error_page 405 = @backend;
  15. add_header X-Cache "HIT from Backend";
  16. proxy_pass http://199.xxx.xxx.xx:xxxx;
  17. include proxy.inc;
  18. }
  19. location @backend {
  20. internal;
  21. proxy_pass http://199.xxx.xxx.xx:xxxx;
  22. include proxy.inc;
  23. }
  24. location ~ .*\.(php|jsp|cgi|pl|py)?$ {
  25. proxy_pass http://199.xxx.xxx.xx:xxxx;
  26. include proxy.inc;
  27. }
  28. location ~ /\.ht {
  29. deny all;
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement