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.
Questions tagged [static-content]
134 questions
0
votes
0 answers
IIS appends /web.config at the end of static files
I am trying to debug a 401 error in IIS that happens when serving static files to an anonymous user.
Let's say I'm trying to access https://example.com/sso.css. That file physically resides on D:\website\sso.css.
Running procmon, I noticed that the…

ixe013
- 1,018
- 2
- 10
- 26
0
votes
1 answer
How can I serve a binary file with executable permission via nginx?
I'm serving a Go binary located in /var/www/bin/binary:
location ~ (binary) {
root /var/www/bin;
}
However, when I download it with wget http://example.com/binary, I can't run it right away, since it's not an executable anymore. I need to run…

Alex
- 139
- 10
0
votes
1 answer
Serve a static page if the backend is down
Apache is acting as a frontend to another (Rails) server that is responsible for handling the requests. How can I make Apache return a static maintenance page when the backend is down (or unreachable in the past minutes)?
The current Apache…

gioele
- 194
- 2
- 10
0
votes
1 answer
A server cluster for static files
I apologize in advance if this question may (by necessity) be somewhat broad. I will try my best to keep it in the format of a valid question.
I am currently setting up a backend for serving large amounts of static files (images, to be specific).…

csvan
- 123
- 5
0
votes
2 answers
Nginx rewrite location internally to serve static content
I'm trying to serve static content from an endpoint that differs in hierarchy structure than the actual root directory structure. This is the result I'm trying to achieve:
0.0.0.0/Claw/scripts/main.js -> /home/ubuntu/Claw/public/scripts/main.js
I'm…

Brodie
- 105
- 1
- 7
0
votes
1 answer
IIS 7.5 Scripts-folder outside of Content-folder
I have just setup my asp.net site with IIS and I've found a problem with my javascript-files. From my visual studio project the files are stored in /Scripts/. But when I have the scripts in /Scripts/ in IIS I can't reach them.
If I move my scripts…

Tobias
- 101
- 2
0
votes
1 answer
nginx serve static files directly if not matched by rewrite rules
I just moved from apache to nginx and I'm struggling with some configuration settings that doesn't seem to work. I have these rules from my previous .htaccess file that I'm trying to convert to nginx rules:
RewriteCond %{REQUEST_FILENAME}…

misterjinx
- 83
- 1
- 11
0
votes
1 answer
serving static assets via http is really slow compared to sshfs (apache2/nginx)
After migrating to a new VPS I had some users complaining about slow loading images on their sites. After creating some test files with dd I realized that I can download all files via sshfs with full speed while downloads via web are painfully slow.…

s1lv3r
- 1,155
- 1
- 14
- 24
0
votes
1 answer
How to ensure all public mirrors contain same content?
Basically I plan to have some files mirrored on multiple servers on different providers.
A unique cname will auto-balance the traffic across all available mirrors and will serve from the closest to the user. What I am afraid is the following:
What…

Jim
- 410
- 4
- 14
0
votes
1 answer
autoscale static content on ec2 using local cache
Hello Serverfault members.
I want to achieve the following setup on EC2:
A load balancer starts and stops instances which only serve static content. (a javascript based application)
I do not want to manually update the code of the application on the…

McFarlane
- 113
- 4
0
votes
3 answers
Best way to serve static content
For the moment, I serve my static content (jpg, png, css) from mydomain.com like this:
location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ {
root /home/www/mydomain/current/web;
add_header Cache-Control public;
expires 365d;
access_log …

Nathan
- 11
- 2
0
votes
1 answer
Serving static directory on subdomain with assets
I have a html presentation which I would like to serve on a subdomain on my server. It just consists of some static html files and some assets (the Github is here).
I'm trying to write an nginx config file which will serve the presentation. What I…

duckyfuzz
- 149
- 1
- 7
0
votes
1 answer
Deploying a static site on AWS EC2/nginx: what am I doing wrong?
I set up a micro instance (Ubuntu, 32 bit) and assigned an elastic IP (23.23.245.104)
Public DNS: ec2-23-23-245-104.compute-1.amazonaws.com
I successfully ssh'ed to the machine and installed nginx.
Then I edited the server_name attribute in nginx's…

Alex
- 139
- 10
0
votes
1 answer
Caching all files in varnish
I want my varnish servers to cache all files. At backend there is lighttpd hosting only static files, and there is an md5 in the url in case of file change, ex. /gfx/Bird.b6e0bc2d6cbb7dfe1a52bc45dd2b05c4.swf). However my hit ratio is very poorly…

csgwro
- 61
- 6
0
votes
1 answer
Setup nginx for serving static only via a subdomain
All I want to do is to set up a nginx server to serve static files ONLY. This nginx server sits behind a HAProxy, and HAProxy directs all the requests for static files to this nginx server.
I have already created a subdomain: static.mysite.com…

MLister
- 211
- 1
- 5
- 12