Skip to main content

Questions tagged [static-files]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
12 votes
1 answer
47k views

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 ...
Nathan Osman's user avatar
  • 2,745
12 votes
1 answer
27k views

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 ...
aallrd's user avatar
  • 291
8 votes
3 answers
48k views

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-- ...
Andrey's user avatar
  • 221
8 votes
1 answer
5k views

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 ...
summatix's user avatar
  • 235
6 votes
1 answer
7k views

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....
Barney Szabolcs's user avatar
5 votes
1 answer
8k views

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 <?xml ...
bUKaneer's user avatar
  • 165
5 votes
1 answer
3k views

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 ...
RSSCake's user avatar
  • 101
5 votes
2 answers
7k views

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 ...
Lee's user avatar
  • 155
3 votes
1 answer
10k views

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 ...
Mike Shito's user avatar
3 votes
2 answers
8k views

Building a high performance file server using SSD as cache

I want to build a file server that serves ~50 TB of content to its users. To maximize the server's throughput, I'm going to utilize the follow scenario. 50 TB of HDD storage. All of the static files ...
Sadjad's user avatar
  • 133
3 votes
1 answer
27k views

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 ...
Chamnap's user avatar
  • 815
3 votes
1 answer
4k views

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 ...
TheLearner's user avatar
3 votes
0 answers
979 views

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 ...
hl037_'s user avatar
  • 267
3 votes
3 answers
4k views

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-...
Rihards's user avatar
  • 779
2 votes
1 answer
853 views

How to serve a huge static and pregenerated website?

My current web project has the following characteristics: A website which is basically a read-only archive of information. There are no interactive actions a visitor could do. All pages (currently ...
JFo's user avatar
  • 145
2 votes
1 answer
6k views

How to configure Glassfish + NGINX to serve static files with NGINX?

I have a EC2 ubuntu with Glassfish v3 + Nginx setup to host my java web application. This application is deployed as a WAR file to Glassfish . The NGINX is currenty passing all request to the ...
user193116's user avatar
2 votes
2 answers
2k views

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 ...
jerichofs's user avatar
2 votes
1 answer
2k views

Nginx: / for both static content and proxied application

http://example.com: my site http://example.net: the proxied backend I'm trying to setup an nginx server block as both a static content server and a reverse proxy. Nginx should first check for static ...
Charles's user avatar
  • 303
2 votes
1 answer
1k views

Apache HTTPD: URL resolution for a virtual host with proxies and directory alias

Here's what my environment looks like: REST api (django), running over WSGI (mod_wsgi) on port http://server:8107/api static files for the API site (i have some admin pages), in a directory, say /opt/...
Olivier H's user avatar
  • 245
2 votes
1 answer
2k views

IIS returns 404 when trying to access static files on certain file types

I have a specific file type of .notebook that IIS is blocking. I tried going into request filtering and adding .notebook with allow set to true, but I still get the 404. Anything else in this folder ...
Jhorra's user avatar
  • 123
2 votes
1 answer
5k views

Nginx redirect all request that does not match a file to a php file

I'm trying to get all request to: http://example.com/downloads/* redirect to http://example.com/downloads/index.php except if the requested file exist in /downloads/ ex: http://example.com/downloads ...
Cyrbil's user avatar
  • 123
2 votes
1 answer
1k views

How do I work with static file server?

I'm working on a project where we need to store static files (user images, videos, etc.) on a different server (nginx serves static files). I haven't worked with a separate static file server before, ...
user38484's user avatar
  • 313
2 votes
0 answers
33 views

Nginx reverse proxy not loading static files under sub application correctly [duplicate]

I have a server hosting multiple .NET Core applications on different ports, with nginx reverse proxy setup to redirect users to the correct application via URL. The current setup is as followed: ...
Jeff Do's user avatar
  • 21
2 votes
1 answer
6k views

Apache2 - How to serve static files on a specific folder?

I have 2 virtual hosts serving 2 different sites in my Ubuntu Server 20.04 both in port 80 and 443. I want to use the same server to serve some static files for download on a custom port, let's say ...
Vinicius Franco's user avatar
2 votes
0 answers
2k views

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; ...
Khairul SIt's user avatar
2 votes
1 answer
996 views

Fresh Ubuntu 16.04 Nginx Configuration is Serving Old Static Files

I have a very basic landing page for a domain of mine. For the last couple days I have been fighting a very peculiar issue. For example, the directory contains: vanilla> ./files/ ./index....
Purlek's user avatar
  • 29
1 vote
1 answer
2k views

Apache: mapping multiple directories to the same location

I would like to map multiple directories to the same location with Apache, expecting a behaviour similar to this: suppose that the /static location is to be backed by directories /srv/static1 and /srv/...
Giovanni Mascellani's user avatar
1 vote
3 answers
2k views

What are the advantages of using an image server?

An image server for static images and possibly other static files (css, js, etc). Are they only used for large/popular websites? Secondly, are they only really beneficial when the images undergo some ...
Gabe's user avatar
  • 167
1 vote
3 answers
2k views

Nginx FastCGI not caching static files?

I configure fastCGI to cache with NginX. It work with .php file, but i can't cache static file like .jpg, .mp4... My infomation when check with cURL: curl -I http://192.168.1.223/music.php HTTP/1.1 ...
dvthanh's user avatar
  • 11
1 vote
2 answers
8k views

Nginx rewrite URLs but not static files

I need to rewrite URLs like http://www.domain.com/blog/wp-content/uploads/this-is-a-static-file.jpg to http://www.domain.com/wp-content/uploads/this-is-a-static-file.jpg I am using this rule: ...
arg's user avatar
  • 13
1 vote
1 answer
203 views

Coldfusion App: Database vs Static File Performance Under Heavy Load

We have a CF8 web application that can be run in two modes: Database or Static file. Under heavy load, the Database mode out performs the Staticfile mode noticeably. And I am trying to figure out why. ...
KM.'s user avatar
  • 1,816
1 vote
1 answer
4k views

s3 static site: Amazon using wrong bucket

I'm setting up a static site, hosted on S3, using this set of directions: https://www.linode.com/docs/platform/object-storage/host-static-site-object-storage/ I've set my bucket up with the name ...
tjb74's user avatar
  • 13
1 vote
3 answers
4k views

Why my browser wouldn't load all image resources at once?

I am trying to optimize the loading time of a webpage. Currently, the main http request can be done in under a second, however, the consenquent loading of images seems "to cascade": http://picpaste....
Enuy's user avatar
  • 111
1 vote
3 answers
456 views

What is the best way to optimize a Windows Server 2008 box running IIS7 to serve only static files?

I would like to have our web applications pull static content (css, js, images) from a static file server running Windows Server 2008 and IIS7. What sort of optimizations would you make to the server ...
rmontgomery429's user avatar
1 vote
1 answer
297 views

Django + Nginx + Gunicorn - Static files not found

I'm using Django+Gunicorn+Nginx for my web application in a Ubuntu 22.04.4 server. I followed this guide until the end and my web is running in production. However, static files are not working (css, ...
pfrud's user avatar
  • 21
1 vote
1 answer
2k views

Nginx static files caching from different folders

The problem is nginx does not display images and shows 404 not found on some folders. When i remove caching from config everything works fine. Trying to configure nginx to cache static files with this ...
merdan's user avatar
  • 113
1 vote
1 answer
4k views

nginx serve static files AND reverse proxy

I want the browser to be in constant communication (websocket) with my backend servers as they are constantly receiving data. But I also want static files to be served to them by nginx. In other words,...
Normajean's user avatar
  • 131
1 vote
1 answer
4k views

Nginx location block for static content without listing every extension?

I need to add cache policy to my static content. Initially, I had manually listed all the extensions I deemed static, which is what almost every answer suggests: location ~* \.(jpeg|jpg|gif|png|ico|...
ᴍᴇʜᴏᴠ's user avatar
1 vote
1 answer
70 views

Nginx fails to direct to https server block on same domain

I'm attempting to serve a static file using nginx over https. Setup DNS correctly points subdomain to AWS IP: subdomain1.website.com -> correct IP Working config I've found the following ...
Jacob Young's user avatar
1 vote
2 answers
803 views

Why is IIS 7.5 showing two requests for static files?

We are running IIS 7.5 on Windows Server 2008 64-bit. Mainly, we run Coldfusion 9 and don't really use ASP.NET stuff. Kind of weird, but when we look at the "Worker Processes" module (on the main ...
jzimmerman2011's user avatar
1 vote
1 answer
1k views

Static file download from browser breaking in varnish but works fine in Apache

I would at first like to thank everyone at serverfault for this great website and I also come to this site while searching in google for various server related issues and setups. I also have an ...
Ron's user avatar
  • 11
1 vote
4 answers
300 views

Scaling a GIF hosting site

My friend runs a popular Youtube-to-GIF conversion site. Right now, he has converted 250,000 Youtube videos to GIFs (each video gets 6 thumbnails for 1.5m total GIF files) and serves about 80TB of ...
linkedlinked's user avatar
1 vote
0 answers
4k views

NGINX file server with symlinks

This is a bit of a beginner question, but I'm trying to make Nginx serve a static file server that contains symlinked folders. Eg, the root directory might contain directories A and B, which each ...
ak0000's user avatar
  • 111
1 vote
0 answers
212 views

Mixing private and public static files in AWS is either fully private or fully public

I am trying to move my static assets to AWS. I am following many blog posts but most of all this one: https://simpleisbetterthancomplex.com/tutorial/2017/08/01/how-to-setup-amazon-s3-in-a-django-...
Micromegas's user avatar
1 vote
1 answer
1k views

img 404 using Nginx, Docker, Django, Digital Ocean

For some reason, my CSS, JS, and Font-Awesome static assets are recognized and serving properly, but my img static files are showing 404 errors in the Nginx Docker container logs. Everything works ...
Taylor Parrish's user avatar
1 vote
1 answer
1k views

Nginx serving static files via Unicorn upstream (tcp)

I'm trying to create a rails app with load balancer. App is running but I don't know how to serve static files. All examples assume that nginx and unicorn running on the same machine. Here is the ...
mef_'s user avatar
  • 113
1 vote
1 answer
906 views

Nginx: Disallow index.html in URL

We're generating a site consisting of only static files (using Assemble). Having the .html extension on URLs looks so nineties, so we generate every static HTML file in its own directory and call it ...
Martin Vilcans's user avatar
0 votes
3 answers
201 views

We are migrating our wordpress to static site. That is creating over 400,000 folders within 1 folder. Is there any limit to the number of sub-folders?

Our wordpress web site is several years old and has many posts indexed and ranking well on google. With any serious traffic my wordpress server tanks - and this happens even after several rounds of ...
Muhammad Ebrahym's user avatar
0 votes
1 answer
384 views

Any way to reduce redundant location block codes in Nginx config?

Is it possible to DRY a bunch of location blocks in Nginx with the exact same configuration, just different routes? Take a look at the following snippet off my Nginx .conf, for instance: location / { ...
TheLearner's user avatar
0 votes
1 answer
748 views

What does rsync status code 3072 mean?

I'm using the static site generator Nanoc, with rsync locally and on the (ancient Ubuntu) server so I can deploy from the command line. It's been awhile since I last used rsync for this site but I'm ...
Dave Everitt's user avatar