Current File : /home/inlingua/www/decay_sym/root/var/softaculous/apps/nginx/common_proxy
# Redirect server error pages to the static pages
error_page 500 502 504  /500.html;
location = /500.html {
    root	/usr/local/apps/nginx/etc/conf.d;
    internal;
}

error_page  404			/404.html;
location = /404.html {
    root	/usr/local/apps/nginx/etc/conf.d;
    internal;
}

error_page  497			/497.html;
location = /497.html {
    root	/usr/local/apps/nginx/etc/conf.d;
    internal;
}

error_page  555 /555.html;
location = /555.html {
    root	/usr/local/apps/nginx/etc/conf.d;
    internal;
}

location @maintenance {
    root	/usr/local/apps/nginx/etc/conf.d;
    rewrite ^(.*)$ /noindex.html break;
}

location / {
	try_files $uri $uri/ /index.php;
}


location ~ \.php|pl|cgi$ {
    try_files $uri =404;
    proxy_set_header   Host   $host;
    proxy_set_header   X-Real-IP  $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://[[IP]]:[[PORT]];
}

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 1M;
    try_files $uri @backend;
}

location @backend {
	internal;
	proxy_pass http://[[IP]]:[[PORT]];
}

# To catch index.php by default
location ~ (index.php|/)$ {
    proxy_set_header   Host   $host;
    proxy_set_header   X-Real-IP  $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; 
    proxy_pass http://[[IP]]:[[PORT]];
}