Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- error_log /var/log/nginx/vhost-error_log warn;
- listen 199.xxx.xxx.xx:xx;
- server_name mysite.com www.mysite.com;
- access_log /usr/local/apache/domlogs/mysite.com-bytes_log bytes_log;
- access_log /usr/local/apache/domlogs/mysite.com combined;
- root /home/cpanel-user-name/public_html;
- location / {
- 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)$ {
- expires 1d;
- try_files $uri @backend;
- }
- error_page 405 = @backend;
- add_header X-Cache "HIT from Backend";
- proxy_pass http://199.xxx.xxx.xx:xxxx;
- include proxy.inc;
- }
- location @backend {
- internal;
- proxy_pass http://199.xxx.xxx.xx:xxxx;
- include proxy.inc;
- }
- location ~ .*\.(php|jsp|cgi|pl|py)?$ {
- proxy_pass http://199.xxx.xxx.xx:xxxx;
- include proxy.inc;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement