All Questions
43
questions
0
votes
1
answer
673
views
nginx proxy_pass fallback location
I'm using nginx as a reverse proxy for my web application with proxy_pass for the api.
This is my current config, where I've nginx directive location /data/ where images are being displayed from the /...
0
votes
0
answers
764
views
400 Bad Request errors (infrequent) on public Amazon S3 assets
We are hosting S3 public assets (images) under a local path using a reverse proxy from NGINX to S3.
We have noticed periodic errors in our logs (400 errors) which are very infrequent, but are causing ...
1
vote
0
answers
323
views
S3 through Nginx Proxy doesn't allow more than 10 files to be downloaded simultaneously
I setup a Nginx Proxy in front of my S3 object storage and I'm able to download files without any issues so far.
However, if I try to download the same file from, let's say, 30 different servers, at ...
1
vote
1
answer
523
views
is it possible to change aws s3 access denied message with nginx 403 forbidden
I am using DigitalOcean Spaces. How do I change the XML access denied page to Nginx 403 forbidden page
0
votes
0
answers
172
views
How to move nginx cache contents to another machine
I'm running a nginx server on debian 9 to save some bandwidth for my s3 bucket. It currently holds 300gb of data. In order to save some money I want to move this data to another server. I'm currently ...
0
votes
2
answers
4k
views
What is the way to access private S3 bucket files using nginx as proxy?
I have a website and an S3 bucket with numerous images, which should not be accessible directly from any machine with a direct URL.
Those images will be shown on different website pages for ONLY ...
0
votes
2
answers
2k
views
nginx proxying S3 public bucket hosted by minio service
I'm trying to do what I would have thought was the easiest proxy directive in the world, proxying a public S3 bucket.
This is my config:
server {
listen 80;
listen [::]:80;
server_name ...
3
votes
0
answers
335
views
Downloading fails at random for our users from S3, need help figuring out what's wrong
We have a file sharing service where users can upload, share and download their files. We are using AWS S3 to store our files.
We're facing an issue where small files download fine, but when files ...
2
votes
1
answer
589
views
Use S3FS Mount As HTTP Server Document Root
My proposed setup:
An EC2 server running Apache or nginx.
An S3 Bucket in the same region/availability zone mounted with S3FS.
The Apache or nginx document root set to the S3FS mount.
My question: ...
1
vote
0
answers
3k
views
How to set up S3 bucket with nginx?
I've encountered with the problem. I created S3 bucket with default permissions and uploaded files for my website (js, css, html) but when i try to access it via browser i get access denied. So i set ...
0
votes
1
answer
747
views
X-Accel-Redirect resume broken download
I am using Nginx X-Accel-Redirect to serve a large protected file (several GBs) to users. The server application processes the URL and verifies the download token (embedded in URL) and starts or ...
1
vote
0
answers
63
views
pushStates / S3 : refreshing the page
I have a SPA (Single Page Application) exposed on a S3 server on which I have no control.
It has its (front) routing based on history pushstates in html5 mode.
Everything is in an "index.html" page.
...
1
vote
1
answer
236
views
Why does NGINX rewrite my url when I don't have a trailing slash? (url should not be rewritten)
I am trying to get a route such as example.com/misc/page to go to the same place as example.com/misc/page/. The route /misc goes to an s3 bucket that contains a bunch of other static pages that I am ...
1
vote
0
answers
610
views
Configuring nginx Reverse Proxy and Cache on Wordpress on AWS EC2 and S3 with multiples websites
I search on google and a lot of other questions here, but none helped me with my problem.
So what I'm trying to do is to serve all statics contents from s3 and the only ones that has to run in server-...
4
votes
1
answer
6k
views
Rewriting url with results from auth_request
I'm trying to use nginx to proxy requests to files stored on S3, however, I don't want to expose our bucket structure, and I need authorization that the user can access a particular file. I've managed ...
4
votes
4
answers
18k
views
AWS S3, CloudFront, web font CORS error
I've just moved from my previous CDN to CloudFront for two of my websites. First one is working fine but I used the same snapshot in DigitalOcean to create the 2nd site and here I am getting
...
0
votes
2
answers
2k
views
proxy_pass CDN file in NGINX, but get 502 bad request
I am using S3 to store an xml file and use CloudFront to distribute this file. I want to use nginx proxy_pass to locate this file without change my domain name. such as www.mydomain.com/filename.xml
...
1
vote
0
answers
7k
views
Intermidiate "upstream prematurely closed connection while reading upstream"
I am getting an intermediate "upstream prematurely closed connection while reading upstream" errors on my server.
The error only occurs on the data that is requested throe the server from Amazon S3 ...
3
votes
0
answers
627
views
How to have frontend, on s3, and backend on another server with the same domain
I have the frontend part of an application on Amazon S3 and the backend on cloud66, with NGinx. The DNS have 'www.website.com' pointing on S3 and 'api.website.com' pointing on nginx. I want to use the ...
0
votes
0
answers
788
views
Nginx proxy to S3 and still use S3 IP whitelisting
I've got a slightly strange situation where I need to proxy s3 (yes, I know, I know, not ideal, performance, etc).
The issue is the buckets need to be restricted to a select number of client ips, ...
2
votes
1
answer
6k
views
Nginx reverse proxy causing file downloads to take excessive time to start
Overview
My web app allows users to upload files which are stored on s3 via my servers. When a user requests a file my web server retrieves it from s3 then sends it on to the client.
I recently ...
0
votes
0
answers
3k
views
Nginx Proxy pass with aws s3 gives 403
I have an web app that uploads images in server and copies them to s3 bucket using awscli. Nginx on server retrieves images from s3 through reverse proxy.
When I try to open image using url, it gives ...
8
votes
2
answers
7k
views
Cant connect to S3 with nginx
I'm trying to serve static and media files from the amazon S3 bucket but Nginx can't connect to it
Here is the error I get
<Error>
<Code>AccessDenied</Code>
<Message>
AWS ...
2
votes
1
answer
10k
views
Change nginx HTTP status code when using proxy_pass
I have the following scenario: a nginx serving static files to clients. For a request, the file is searched for in a local directory and, if not found, the request is forwarded to Amazon S3 via a ...
1
vote
0
answers
2k
views
Access denied for the request of data from s3 bucket on high load
I am trying to fetch static files from s3 bucket in case of 502 error.
This is how I have configured nginx for requests :
error_page 502 = @static;
location / {
index index.php;
try_files $uri $...
11
votes
2
answers
16k
views
Nginx as s3 proxy with private buckets
I'm trying to set up Nginx as a proxy for a static html/js webapp hosted on S3.
I read a lots of tutorials and posts and I could make it work if my bucket is set as public.
The reason I need Nginx as ...
0
votes
0
answers
186
views
NGINX: proxy_cache altering headers
I have been having trouble building a proxy between my server and s3 to cache requests. I finally boiled it down to a single point of failure...
http{
proxy_cache_path /home/cache levels=1:2 ...
1
vote
1
answer
934
views
Nginx proxy cache invalidating request to s3
I have set up a proxy from my application server to a private s3 bucket to cache requests. I was having some trouble with it where s3 was rejecting my download requests (403 forbidden) and after some ...
1
vote
2
answers
2k
views
regex to match s3 urls in nginx location directive & proxy to amazon s3
In nginx location directive, how do I match s3 urls.
for example, the wrong url is:
http://example.com/https://s3.amazonaws.com/mybucket/logo.jpg?1404251306
from Logs, I can see nginx can that it ...
4
votes
1
answer
3k
views
Cloud-front backed with Nginx (which proxies to S3) randomly missing already cached items?
I wish to serve images from a S3 bucket with Cloudfront as CDN frontend, for that I tried the following:
What I wish to acheive (Attempt 2) -- (Misses cloudfront cache randomly)
I have the ...
0
votes
1
answer
1k
views
Configuring nginx server to handle requests from multiple domains
Use Case:- I am working on a web application which allows to create HTML templates and publish them on amazon S3.Now to publish the websites I use nginx as a proxy server.
What the proxy server does ...
0
votes
1
answer
1k
views
How i can setup a nginx cache strategy that first try amazon s3, then memcache and do a fallback on miss?
i have a large site with lot of pages that almost never change, right now i am using two memcache servers (amazon elasticache), but this its really expensive.
Thats why for this files that barely ...
0
votes
1
answer
2k
views
Nginx proxy to s3 bucket gets 400 Invalid Argument
I have a Django app in which I serve media files through an nginx proxy to s3.
The relevant python code
response = HttpResponse()
response['X-Accel-Redirect'] = '/s3_redirect/%s' % filefield.url....
0
votes
1
answer
548
views
AWS route53 forwarding
Essentially, I need to know how to point one URL/folder to a web server and a different URL/folder to an EC2 app server. I'm trying to setup a SAAS with the following URL configuration.
www.mysite....
1
vote
0
answers
328
views
Handling multiple server blocks in nginx configuration
I am working on setting up a proxy server for my application.The use case is I want a specific set of requests to be redirect to say abc.com and rest of the request to be redirected to xyz.com.
Eg:If ...
4
votes
2
answers
3k
views
Enable Cross Origin Scripting on Nginx from retina.js to load files from another URL?
Im running a retina image plugin along with W3 Cache for CDN support. W3 cache moves images to S3, but the JS file won't server the files from there due to the difference in URL (it goes from h ttp://...
1
vote
1
answer
13k
views
Nginx static content with Amazon S3
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.
...
4
votes
1
answer
2k
views
Serve up s3 file with nginx
I have some static files sitting in an S3 bucket that I want to serve up from my nginx server. Basically, if a user goes to www.mywebsite.com/this/url I want to serve them up a file from the S3 bucket....
1
vote
1
answer
1k
views
Redirecting missing staging images to production
I currently have a production web site which hosts a large volume 50GB+ of images on s3. For my staging environment at first I was cloning the production bucket into a staging bucket but this has ...
9
votes
3
answers
8k
views
Serving static files with amazon s3 vs nginx
Let say I have an django application
Will it be better (performance-wise) to serve the static files with s3 or to setup an nginx server on a ec2 instance?
0
votes
2
answers
3k
views
Rewriting urls with nginx to make them serve an index.html
I'm using S3 to host some static content, and using a bit of url rewriting to make everything work.
This is my conf right now:
server {
listen 80; ## listen for ipv4
listen [::]:80 ...
1
vote
1
answer
4k
views
Serving static sites from S3 with nginx
I know that S3 can serve a simple index.html file if it's in the root of a bucket, but my need is to serve lots of simple static sites and S3 has a limit of 100 buckets per account, so I have to use ...
5
votes
5
answers
1k
views
What sort of web server hardware do you use to handle 100 Mbps+ of static files?
I currently use Amazon S3 for much of my static file serving needs but my monthly bill is getting very expensive. I did some rough calculations using the logs and at peak times, my most expensive ...