Im using Nginx front-end server in front of glassfish app. server. I uploaded my static contents to Amazon S3. I need to implement passing static request to Amazon's URL. I did a conf file like below.
location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ {
access_log off;
expires max;
proxy_pass http://s3-eu-west-1.amazonaws.com/usta/html/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
But with reqular expression, i couldnt proxy request to Amazon s3 URL, how can i implement this idea?