Questions tagged [static-files]

74 questions
12
votes
1 answer

Reverse proxy application and its static files with Nginx

I am trying to do something that seems to me very simple but I must be stupid or miss something very obvious because I cannot figure it out. I want to access the multiple web applications running on my server with a unique prefix for each one of…
11
votes
1 answer

Why isn't IIS serving my static CSS / JS files?

I added an ASP.NET MVC3 site to ISS (which was working fine in the debugger). When viewing the site in a browser, everything appeared to be working fine except that all of the CSS and JS files were returning a 404. Here is the site in IIS…
Nathan Osman
  • 2,705
  • 7
  • 31
  • 46
8
votes
1 answer

Serve different files for specific user agents using nginx

Using nginx, how do you serve different static files for different user agents? For example, if the current user is using an iPhone, they should be served mobile_index.html, whereas all other user agents should be served browser_index.html. Found…
summatix
  • 225
  • 1
  • 3
  • 6
7
votes
3 answers

Nginx does not serve large files

When trying to download a large file (not sure what size is enough, trying to download 5Gb), connection is stuck: $ wget --verbose http://example.net/large.zip -O /dev/null --2016-12-14 12:52:38-- http://example.net/large.zip Resolving example.net…
Andrey
  • 201
  • 1
  • 2
  • 5
6
votes
1 answer

How to serve specific static files with nginx?

I have queries like /api/lang?lang=en which I want to serve with nginx as /server/i18n-angular/en.json. How can I do that? I have the following directory structure: /public/ /server/i18n-angular/en.json I have the following configuration, but nginx…
Barney Szabolcs
  • 171
  • 1
  • 7
5
votes
1 answer

IIS 8.5 Serve file with no extension from particular folder

I have some files that have been uploaded to a folder called /Download however the have no extension e.g. File1 I have tried adding a /Download/Web.Config file with the following specified
bUKaneer
  • 165
  • 1
  • 6
5
votes
1 answer

How to serve static files with apache on openshift official python cartridge?

I have scalable openshift online app with official python-2.7 cartridge. By default everything is served with mod_wsgi handler. How do I configure my app and/or Apache to serve some static files in my repo (like images, css and javascript) with…
RSSCake
  • 101
  • 1
  • 5
4
votes
2 answers

Static file permissions with Nginx, Gunicorn and Django

I attempting to setup a Nginx server up with a Gunicorn WSGI server running Django behind.. The setup all seems to runs except i have a permissions issue. I have setup aliases to /media and a /static directory for serving up static content however a…
Lee
  • 145
  • 1
  • 12
3
votes
1 answer

Unable to serve NextJS static assets through Nginx

I have a NextJS app running on port 3000 and I have a test.ico file located at the following location: /static/images/icons/ I want this file to be served off the root rather than the actual path. I mean instead of…
TheLearner
  • 157
  • 1
  • 6
3
votes
1 answer

nginx 403 when serving static files + reverse proxy

I'm trying to serve a node app through nginx, but first attempt to serve static files that may be in a /public folder. I've got that much working -- but when accessing domain.tld/ or the index of static folders, I get a 403; directory index of…
3
votes
0 answers

fcgi to serve static files with nginx

Maybe I'm wrong, so before to ask my question, I'll explain a little what I'm trying to set up : I've a VPS where I want to have multiple users sites, with permission denied to all users to see the directories of others. It's a linux but the…
hl037_
  • 257
  • 2
  • 9
3
votes
1 answer

nginx status code 200 and 304

I'm using nginx + passenger. I'm trying to understand the nginx response 200 and 304. What does this both means? Sometimes, it responses back in 304 and others only 200. Reading the YUI blog, it seems browser needs the header "Last-Modified" to…
Chamnap
  • 765
  • 3
  • 9
  • 13
3
votes
3 answers

What headers to add for most efficient file caching?

So I've this response header for static files on my nginx server. Cache-Control:max-age=2592000 Connection:keep-alive Date:Sat, 11 Dec 2010 22:28:13 GMT Expires:Mon, 10 Jan 2011 22:28:13 GMT Last-Modified:Sat, 11 Dec 2010 22:11:35…
Rihards
  • 759
  • 2
  • 12
  • 22
2
votes
2 answers

How to manage static content for high-loaded website via nginx?

My understanding is that nginx is well-suited for serving static content. But i can't find any information with regard to how well it's for serving very big amount of static content. Let's say i use nginx as a web server and node.js as an…
2
votes
0 answers

Nginx Subdirectory returning 404

I currently have a bunch of working static files at the domain name khairulslt.me (from NameCheap). Recently, I've tried setting up a subdirectory (khairulslt.me/RGBGame) as seen in the code below; However, I keep getting 404 errors. What am i…
1
2 3 4 5