Welcome! Log In Create A New Profile

Advanced

proxy non-existant files

Posted by nabeel 
proxy non-existant files
March 27, 2010 06:04PM
Hi all,

I've been trying to figure this out. I've got a list of files to just pull direct, the rest get proxy'd to Apache. I'd like, if the file doesn't exist, then to also proxy that request.

I have right now:

[code]
server {
error_log /var/log/nginx/vhost-error_log warn;
listen 80;
server_name %s %s %s;
access_log /usr/local/apache/domlogs/%s bytes_log;
access_log /usr/local/apache/domlogs/%s combined;
location ~* \.(gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|htm|html|txt|js|css|exe|zip|$
root %s;
expires 7d;
}
location / {
proxy_redirect http://%s:8081 http://%s;
%s
proxy_redirect http://%s:8081 http://%s;

include /etc/nginx/proxy.conf;

}
}
[/code]

Anyone have any ideas? I'm stuck on this one.

Thanks!
Re: proxy non-existant files
March 27, 2010 08:00PM
Nevermind, I got it figured out - with try_uri
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready