Skip to main content

Questions tagged [static-content]

Static content like a static web page is delivered to the user's web browser exactly as stored, in contrast to dynamic content, which is generated for each request by a web application.

Filter by
Sorted by
Tagged with
96 votes
5 answers
112k views

Disable caching when serving static files with Nginx (for development)

We are using Nginx to serve static files on a development platform. As it is a development platform, we'd like to disable caching so that each change is propagated to the server. The configuration of ...
Olivier Chappe's user avatar
16 votes
4 answers
29k views

IIS7 returns blank when static content requested

I am trying to configure a demo machine which is EEEPC with Windows 7 Home Premium edition all the drivers properly loaded (don't ask me why it's Home edition) with IIS7 installed. I've deploy the ...
chakrit's user avatar
  • 427
14 votes
3 answers
3k views

Access Amazon S3 Static Website Through IPv6

I host a static website on Amazon S3 with DNS hosted on Amazon Route 53. I'd like my site to be accessible via IPv4 and IPv6 (because it's about time). When I use the Route 53 AWS Management Console ...
user avatar
14 votes
2 answers
5k views

Using Google's App Engine as CDN for static files

I am planning on moving my static files to Google's App Engine. I was wondering if this is a good idea to do. I have read that is it possible that Google will cache your files on multiple locations, ...
Saif Bechan's user avatar
13 votes
3 answers
41k views

how much RAM for heavy static content serving?

I want to make a server for my static content. I need to serve some 3-10 mb files - a lot. (I will also put on this server some .js and .css and images from my websites). I thought of nginx and G-WAN (...
cripox's user avatar
  • 235
13 votes
3 answers
32k views

Can I use nginx environment variables within static files that nginx serves?

If I use a environment variable in the nginx config, and nginx is configured to serve only static files (html,js,css - e.g. a AngularJs app), is there any way I can use the environment variable within ...
Tom's user avatar
  • 4,397
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
11 votes
2 answers
18k views

Nginx - Serve static content from a cookieless domain

I'm using the "page speed" extension for Firebug to try to optimise a website and I'm currently working on the following suggestion: "Serve static content from a cookieless domain". I have created a ...
Tom's user avatar
  • 4,397
11 votes
3 answers
7k views

Serve static content using docker + nginx + php-fpm

I'm trying to configure a php webapp using docker. The idea is to run the app using php-fpm in a standalone container and have another container that will run nginx. The idea for this setup is to use ...
ThisIsErico's user avatar
9 votes
3 answers
9k views

What's the best way to create a static backup of a website?

I have an old Joomla! site that I would like to convert to a static set of html pages (since it's not being updated anymore and I don't want the overhead of having a MySQL db running for something ...
CamelBlues's user avatar
9 votes
2 answers
18k views

Apache ProxyPass ignore static files

Having an issue with Apache front server connecting to a Jetty application server. I thought that ProxyPass ! in a location block was supposed to NOT pass on processing to the application server, but ...
virtualeyes's user avatar
8 votes
2 answers
15k views

Force Nginx to send Content-Length header for static files with gzip?

We're running Nginx 0.7.65[-1ubuntu2.3]. I've just noticed that when serving local static files using an alias directive and gzip on, the Content-Length header is not getting sent. Since it's serving ...
David Eyk's user avatar
  • 687
7 votes
2 answers
23k views

Django doesn't find CSS files for admin pages using uWSGI

Even if I followed the official instructions, when I start a Django test site using uWSGI, CSS files for the admin interface are not loaded. If I open the URL of a CSS file, for example http://...
Marco Sulla's user avatar
6 votes
2 answers
18k views

Do I need to configure SVG images showing in nginx?

I have SVG images in a folder and also a single PNG file to make sure these images are shown on the page. My nginx config is basically this: server { listen 80; location / { root ...
Sergei Basharov's user avatar
6 votes
1 answer
8k views

Nginx sending 2 Cache-Control headers

Iam serving my static content with ngnix. location /static { alias /opt/static/blog/; access_log off; etags on; etag_hash on; etag_hash_method md5; expires 1d; ...
optixx's user avatar
  • 216
5 votes
12 answers
2k views

Optimum way to serve 70,000 static files (jpg)?

I need to serve around 70,000 static files (jpg) using nginx. Should I dump them all in a single directory, or is there a better (efficient) way ? Since the filenames are numeric, I considered having ...
Ahsan's user avatar
  • 103
5 votes
2 answers
10k views

Nginx reverse proxy in nested locations

I'm using Nginx as a reverse proxy for multiple applications in multiple servers and I'm trying to add common cache directives to static files of each application. My original configuration is ...
Jose Antonio's user avatar
5 votes
1 answer
13k views

Nginx not serving CSS correctly in simple PHP project

I've seen several examples of this now: Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:3001/assets/css/bootstrap.min.css". But, I've not been able to ...
ankush981's user avatar
  • 257
5 votes
0 answers
779 views

Creating a seperate static content site for IIS7 and MVC

With reference to this serverfault blog post: A Few Speed Improvements where it talks about how static content for stackexchange is served from a separate cookieless domain... How would someone go ...
JK01's user avatar
  • 338
4 votes
4 answers
2k views

Alternative to heroku or google app engine for static files

I'm creating a simple site for my family and which is basically just static files (I don't want a CMS). I've tried using heroku and google app engine but heroku wind down the server which yields a ...
Nicklas A.'s user avatar
4 votes
4 answers
4k views

Statically mirroring a heavy trafficked site, CloudFlare as DNS

I run a fairly heavy trafficked website and due to some unfortunate incidents the machines that are in my cloud at Linode went down. And I have only a single Load Balancer machine exposed to the ...
Quintin Par's user avatar
  • 4,443
4 votes
2 answers
5k views

Etag configuration with multiple apache servers or CDN / How does Google do ETags?

I have an application which is served from two apache2 servers and I want to configure the ETags on static content. In the future I would also like to use a CDN. I see that this is supposed to be a ...
perrierism's user avatar
4 votes
2 answers
22k views

Apache serving static files within VirtualHost

I have the following VirtualHost configuration. <VirtualHost *:80> ServerName myservername.website <Location /> ProxyPass http://localhost:5000/ ...
tgandrews's user avatar
  • 165
4 votes
2 answers
3k views

non-www domains prevent hosting of static content on the same domain, correct?

Flaw to using non-www domain a canonical? I love the idea of short, clean urls like example.com over www.example.com, and certainly whichever one is used should redirect to the other. However, as I ...
Kzqai's user avatar
  • 1,288
3 votes
2 answers
4k views

CloudFlare CDN and static site with root on Amazon S3

I've set up an S3 bucket to host my static site. Now I am trying to wrap CloudFlare around this, but I get the following warning when adding a CNAME entry for the root domain in CloudFlare's DNS ...
Harper's user avatar
  • 133
3 votes
3 answers
3k views

Ngix vs G-WAN for static content? [closed]

Can someone point me to recent benchmarks on the two? Also more info about G-WAN would be nice, since up until now I never heard about it. I need the fastest server for static files.
ilija139's user avatar
  • 149
3 votes
1 answer
7k views

S3 Static Website hosting - restricting access from IP Range

Is there way by which can we enforce the access only from a Particular IP Range for S3 Static Website hosted site ?
Naveen Vijay's user avatar
3 votes
2 answers
15k views

Nginx location block - only match actual files

I have the following nginx config: server { listen 8080; root /site_root/web; index index.html; server_name www.mysite.com; location / { try_files $uri @rewriteapp; ...
calumbrodie's user avatar
3 votes
3 answers
2k views

Serve millions of concurrent connections and static files?

I am just curious about the server configurations to serve just static files from one server. Is it possible to build a server that just for static files and serve millions of concurrent connections. ...
DucDigital's user avatar
  • 1,541
3 votes
3 answers
3k views

IIS refuses to serve static .gltf files

I am using three.js library with GLTFLoader.js. I downloaded some free 3D model with .gltf extension (it also came with a .bin file, and a folder with textures). I can access every other file in this ...
Celessor's user avatar
3 votes
1 answer
2k views

IIS7 Minimum HttpModules Configuration for Static content website

I am trying to setup a really fast, compressed, cached static content website to serve only .jpg, .css and .js I want to remove all functionality from the website configuration that is not required: ...
Robs's user avatar
  • 167
3 votes
1 answer
4k views

How to avoid Error 403 Forbidden : Apache virtual host configuration issue

I am quite a newbie to the Apache Server (2.0, I know it is a bit too old, however my workplace demands me to learn it as it is the version we are using)and now trying to get Apache work with Jboss (...
user2986175's user avatar
2 votes
2 answers
9k views

IIS8 not serving static content, even though Static Content role is installed

We have a new installation of Windows Server 2012 acting as a development server. I'm attempting to install DotNetNuke to a site, but when I run the install wizard, while the site comes up, static ...
Michael Itzoe's user avatar
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
2 answers
2k views

With PHP installed, Apache is (comparatively) slow at serving static content?

First some background on how I installed PHP, Apache, and some Apache modules: # apt-get -y install php5 php-pear libapache2-mod-php5 php-apc php5-mysql php5-mcrypt php5-xmlrpc php5-curl php5-imagick ...
its_me's user avatar
  • 225
2 votes
1 answer
6k views

How to make sure clients update their browser cache when my website is updated?

I am using the HTTP 1.1 Cache-Control header to implement client-side caching. Since I update my website only once a month I would like the CSS and JS files to be cached for 30 days with Cache-Control:...
Max's user avatar
  • 3,583
2 votes
3 answers
11k views

Nginx static files exclude one or some file extensions

I'm serving up a static site via nginx. location ~* \.(avi|bin|bmp|dmg|doc|docx|dpkg|exe|flv|gif|htm|html|ico|ics|img|jpeg|jpg|m2a|m2v|mov|mp3|mp4|mpeg|mpg|msi|pdf|pkg|png|ppt|pptx|ps|rar|rss|rtf|...
Evgenii Iablokov's user avatar
2 votes
3 answers
2k views

Apache2 + PHP static directory

I have Apache2 and PHP5 installed. My DocumentRoot is /var/www/. All .php and .html files are served form / and its child directories well. However when I request, say, .png images I get Forbidden ...
Alex's user avatar
  • 2,407
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
5 answers
265 views

Website deployment - managing user-uploaded content?

I'm a programmer by trade, "server administrator" by company necessity. We're looking at dumping the old painful "update site by FTP upload" style of deployment. Having the webserver check out the ...
Legion's user avatar
  • 233
2 votes
3 answers
1k views

Multiple web servers serving same static content

I created a sub-domain for static content to be able to serve it more efficiently by several load-balanced web servers. This static content is updated automatically, at a rate of ~1k files/day. Right ...
Steve Schnepp's user avatar
2 votes
3 answers
2k views

Separating dynamic and static content on high traffic website

I am trying to increase capacity for my website, which is growing beyond what my current web server is able to handle. The site hosts on a dedicated web server (Litespeed), and a dedicated database ...
markxi's user avatar
  • 43
2 votes
1 answer
2k views

apache2 mod_deflate static content

I have a server serving up a JS file a few million times a day using apache2. Some of my users would like the JS to be gzipped. Does anyone know how apache2 mod_deflate handles compression of static ...
user avatar
2 votes
0 answers
449 views

IIS stopped serving static content over a certain (small) size

I'm really hoping somebody can help apply some sanity to this IIS issue that has been driving me crazy. I seem to be experiencing the same problem as the poor soul in this thread: https://forums.iis....
K. Meke's user avatar
  • 121
2 votes
0 answers
911 views

Optimizing an Azure App Service for Static Content

I have a "Basic" Azure App Service Plan hosting multiple App Services. One of those App Services contains exclusively static content (i.e., html, css, js, png, &c.). Question What server-side ...
Jeremy Caney's user avatar
2 votes
1 answer
1k views

Best way to add authentication layer to static file requests?

I am trying to figure out the best way to add an authentication check to requests for static assets on my server. I am running Apache2.4 and PHP/Laravel, which runs by serving static content ...
Neurax's user avatar
  • 123
1 vote
1 answer
502 views

Serving http content files locally instead of off external servers

When building our web pages from different content sources, it may be necessary to get some images from external servers (e.g. when incorporating a rss feed), which may not be as fast or as well ...
Alex Lehmann's user avatar
1 vote
1 answer
1k views

lighttpd, ngingx, fastcgi, static content, What are they, and when do you need them

i am working on an web application that requires the page to be updated every second. You can think of a websites with stocks where the data has to be updated real time. Background For this real ...
Saif Bechan's user avatar
1 vote
3 answers
3k views

nginx hackery : change image file every X request

Let me describe what I am trying to do first. I have a bunch of pictures in a directory called /images/*.(jpg|gif|png|blah blah|) Now say these images are embedded in an html page and I dont really ...
Abhishek Dujari's user avatar