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: 186
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready