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
1
vote
1 answer
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|css|bmp|js)$ {
# …
}
I would then run into…

ᴍᴇʜᴏᴠ
- 577
- 1
- 6
- 20
0
votes
0 answers
Nginx serve another file when possible
I currently compile my assets with Webpack's BrotliPlugin, which creates a separate file, brotli-encoded, i.e.:
style.css
style.cssb
Here's what I want to achieve:
Consider the HTML page requests style.css.
IF
The user sent br into its…

Ben
- 101
0
votes
1 answer
Have Apache send a response defined in the configuration file
I would like my Apache VirtualHost to respond with the same content, no matter the URL requested. I know it is possible with an additional file containing the static response (https://askubuntu.com/a/485017/600828).
However, my response content is…

Nathan.Eilisha Shiraini
- 193
- 2
- 3
- 9
0
votes
1 answer
mod_speling Case Insensitive URLs not working
I have a ServerPilot server, running on Ubuntu 16.04.3
On it is an app that is a Wordpress website, but has other non-wordpress directories. In these directories is what I am concerned about.
I have verified that mod_speling is indeed enabled on…

Kevin
- 133
- 1
- 2
- 14
0
votes
1 answer
serving a WordPress website downloaded from Chrome?
I used Chrome to download a website (using "Menu -> More tools -> Save page as ...".); I want to ftp the html file (renamed to index.html) and the files folder into a static http server and have a working web page. Will this work? (Note, I'm helping…

earlio
- 101
0
votes
0 answers
How to stop Spring Boot project running on Tomcat server to re-depeloy it-self each time I change static resources?
I have Maven Spring Boot Project that I configured to run on Tomcat 8.5 server.
I run and develop it in Eclipse Java EE IDE.
pom.xml is:

Renat Gatin
- 121
- 1
- 5
0
votes
1 answer
Performance of Static website on Google Cloud Storage
I have some low-traffic static websites to host. As an alternative to hosting them on my own or self-managed web servers (eg AWS, Google Cloud, or Digial Ocean machines running Apache or Nginx), I'm considering using Google Cloud Storage:
it seems…

Max
- 3,523
- 16
- 53
- 71
0
votes
0 answers
Nginx: disable caching if page contains the word
I am using nginx as a reverse proxy.
Is it possible somehow to access response page content as a variable to disable caching for a pages that have specific word in content (not in header) WITHOUT modifying backend?
Any way would be appreciated…

POMATu
- 210
- 2
- 10
0
votes
2 answers
Serving Static Content with Apache2
I am really new to apache2 and have previously worked with Nginx. I am trying to use alias in apache2 to serve static content. Starting off with a simple example.
I tried this out and it didn't work either. …

LLL
- 3
- 1
- 3
0
votes
1 answer
Nginx Reverse Proxy static content and relative pass issue
I have the next setup:
Main server main.com
and additional standalone server (additional.com), which should be served via proxy from the subpage url keeping relative paths, etc. main.com/additional
However, trying to setup proxy_pass with…

Dima Arbuzin
- 3
- 1
- 4
0
votes
1 answer
Static resources can't be loaded, what's wrong in this Nginx setup?
In a Docker container running PHP71-FPM and Nginx I have the following setup for Nginx:
server {
listen 80 default_server;
listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2…

ReynierPM
- 710
- 5
- 14
- 30
0
votes
3 answers
nginx proxy pass location from static vhost
I have a reverse proxy (80/443) and a back-end application (8015/44315). Both run on nginx.
The reverse dynamic vhost works fine but I have an little issue with a classic static vhost...
rp vhost conf:
server {
listen 443 ssl;
server_name…

pstk
- 1
- 2
0
votes
0 answers
Preventing nginx static content to be both on cookie-less subdomain and main domain
UPDATE: Removing the rule below solves the unnecessary redirection. Now it just works fine. Though it is still reachable from two places, a canonical header solves the duplicate issue i guess.
I configured my site to have a static sub-domain like…

random373839
- 121
- 1
- 1
- 4
0
votes
1 answer
Proxy static content only for proxyed requests
I have an apache serving one local app on "/" with its static files on "/static"
And another app with mod_proxy:
ProxyPreserveHost On
ProxyPass "/example" "http://127.0.0.1:9090/"
ProxyPassReverse "/example" "http://127.0.0.1:9090/"
And this app…

Marc Salinas
- 3
- 2
0
votes
1 answer
Nginx - serving static files
What am I doing wrong here?
This works:
location / {
alias /var/www/static/;
try_files $uri index.html =404;
}
But this doesn't:
location /hello {
alias /var/www/static/;
try_files $uri index.html =404;
}
Here is the error I'm…

Rasmus73
- 1
- 1
- 1