Welcome! Log In Create A New Profile

Advanced

proxy only certain assets based on host header?

May 23, 2013 09:07PM
We're trying to proxy only certain assets like png|jpg|css only when the host header is a certain DNS name. I tried to do this in the proxy.conf file using something the example below but it doesnt like the if statement. Is there a way to have nginx do what I am looking for?


if ($http_host = dnsname.com) {
location ~ ^/(stylesheets|images|javascripts|tools|flash|components)/ {
proxy_pass http://assethost
}
}
SubjectAuthorPosted

proxy only certain assets based on host header?

amagadMay 23, 2013 09:07PM

Re: proxy only certain assets based on host header?

António P. P. AlmeidaMay 24, 2013 04:46AM

Re: proxy only certain assets based on host header?

Maxim DouninMay 24, 2013 09:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 5 on December 17, 2014
Record Number of Guests: 154 on December 17, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready