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.
138 questions
1 vote
1 answer
83 views
NGINX URL rewrite (or something?)
Hosting static content currently and trying to get NGINX to do what I want seems to be a nightmare. I've basically got this setup: root web directory -> pages -> sub-folder > webpage.html I ...
0 votes
1 answer
75 views
Cloudflare accept `.html` at end of URLs
I moved a static website, built with 11ty, from AWS to Cloudflare pages. I am having a problem: Cloudflare is not handling .html at the end of URLs the same way that AWS was. So, for example -- This ...
1 vote
1 answer
199 views
apache2 out of memory when serving large static files
I am running an apache2 server with several virtual hosts. I run it on a rather resource constrained raspberry pi 4. In particular RAM is very tight (4GB). There isn't a whole lot of traffic, I mainly ...
1 vote
1 answer
1k 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, ...
0 votes
1 answer
80 views
Is possible return a static page in https virtual host using lighttpd?
It seems like redirect is not done. If I put URL https://test2/static_page in browser it works but if I put https://test1 don't redirect SERVER["socket"] == ":443" { $HTTP["...
0 votes
0 answers
1k views
Nginx Reverse Proxy custom location not serving static files
I'm trying to serve 2 different websites under the same subdomain depending on the location. Using the GUI from Nginx Proxy Manager Docker container I've managed to set up the initial domain https://...
1 vote
1 answer
1k views
Best way to serve static folder that is not presented in frontend build
I have the following situation. Web content of my app is located in a standard directory /var/www/my.domain.com/html/. Also I have a folder users_statics somewhere inside this directory, where my app ...
0 votes
1 answer
678 views
S3 static website is loading pretty slow on private window mode only
I'm not sure is this is an S3 issue or something with my website but would like to ask the community for some help. Configuration: I have a static website (about 700KB) hosted on S3. My .css and .js ...
0 votes
1 answer
635 views
Can't access static site S3, Cloudfront, Route53
I apologize if this needs to be split into two questions, but I'm trying to set up a static site using S3, a CloudFront distribution, and a Route53 domain. If I try to access laszloffy.com, I receive ...
0 votes
1 answer
341 views
nginx append query parameter with encrypted value to a react application
I want to send the DN field from the client certificate ($ssl_client_s_dn), but I want to send it encrypted. In the question nginx append query parameter to a react application it is explained how to ...
0 votes
0 answers
677 views
NGINX proxy not serving static content
I've setup a proxy NGINX that access a Wordpress server on 10.0.0.151: # # Default server configuration # server { listen 80 default_server; listen [::]:80 default_server; root /var/www/...
0 votes
1 answer
630 views
Prevent Apache2 from executing CGI in Static Directory
I am running an Apache 2 web server running on Ubuntu 20.04 LTS. I have a Python CGI handler enabled for the /var/www/html directory, which is the DocumentRoot. I am wondering how to exclude a certain ...
0 votes
0 answers
1k views
Apache2 alias loading from document root instead of alias directory
I have problem with apache2. I'm new to it and I'm trying to solve some problems. I have a server running debian with apache2.4 installed and 3 web-site running. A Shiny Server, a django website and a ...
2 votes
1 answer
6k 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|...
0 votes
2 answers
784 views
Tool to create pre-compressed [Brotli] files
I am trying to pre-generate compressed brotli files in designated directories for static html, css and js files. I found a rust tool here – https://github.com/neosmart/static-compress Besides this, ...
2 votes
0 answers
540 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....
0 votes
1 answer
428 views
wget website recusively from localhost without using bandwith
i'm looking to download recusively my wordpress website into static using wget, the problem is that whenever i do that, it's using too much bandwith (3.5gb) even though i end up downloading 20mb which ...
0 votes
0 answers
547 views
Static websites in s3 bucket returns 404 for links
I'm uploading Gatsby static built files to s3 static website hosting in subdir. For example. test.s3-website-us-west-2.amazonaws.com/site1 test.s3-website-us-west-2.amazonaws.com/site2 So I want ...
0 votes
0 answers
580 views
htaccess not redirecting images?
I'm trying to force all content to use HTTPS. I added the following rule to my htaccess: RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule ^.*$ https://%{HTTP_HOST}%{...
0 votes
0 answers
325 views
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 ...
2 votes
0 answers
1k 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 ...
1 vote
0 answers
177 views
apache fail to serve static files when ipv6 enabled
I have apache 2.4 running on openSUSE, has been working great for years. A few weeks ago I upgraded from openSUSE 15.0 to 15.1, and suddenly apache would fail to serve static files. I found that if I ...
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 ...
0 votes
1 answer
1k views
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/...
0 votes
1 answer
2k views
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 ...
2 votes
2 answers
3k 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 ...
0 votes
1 answer
68 views
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 ...
2 votes
1 answer
2k 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 ...
0 votes
0 answers
8k views
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: <?xml version="1.0" encoding="UTF-8"?> <project ...
1 vote
0 answers
2k views
Nginx & NodeJs slow static file serving
I have a small NodeJS app, with an Nginx front to serve the static files to increase performance. The bundle.js file takes around 1s with no load, however, add some concurrent users and the bundle.js ...
1 vote
1 answer
1k views
Redirecting .app domain to Amazon S3 bucket (SSL)
I'm currently hosting a static website on an Amazon s3 bucket (i.e. https://s3.eu-east-2.amazonaws.com/MyApp/index.html) and I have recently bought an .app domain which I would like to redirect to the ...
0 votes
1 answer
869 views
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 ...
0 votes
0 answers
927 views
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 ...
0 votes
2 answers
4k views
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 ...
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 ...
6 votes
2 answers
20k 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 ...
5 votes
1 answer
14k 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 ...
0 votes
1 answer
3k views
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 ...
2 votes
1 answer
969 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 ...
1 vote
2 answers
4k views
Configure nginx to serve static files
I'm trying to serve static files(HTMLs, JS and CSS) from a Google compute engine instance running Debian 8. I used git to clone the web app to the folder /var/www/prod/app with command sudo git ...
1 vote
1 answer
3k views
Nginx+PHP-FPM: Let php handle file extensions
I am trying to serve a PHP script that handles some RESTful URIs and to know which format end user needs data, I handled that as the extension in the URI, eg.: example.com/foo/bar.json?q=x&a=y --&...
1 vote
2 answers
2k views
How do I configure apache2 to serve static assets from server root subdirectory?
Front end developer here - I just inherited a server (Mac Pro) to host my prototypes within our network. There's already an apache server set up on it, but I don't know much about it's config. This ...
0 votes
1 answer
185 views
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 ...
0 votes
3 answers
1k views
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 ...
12 votes
1 answer
28k 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 ...
0 votes
0 answers
560 views
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 ...
1 vote
3 answers
3k views
How to make nginx try_files get html resources in a timely way
Using nginx 1.8.1 on an Amazon Linux EC2 instance. Using as a reverse proxy to support https for Apache running on a different instance. All is working fine, except for this issue. I want to serve a ...
1 vote
2 answers
6k views
Allowing all headers in CORS
I want to configure my Apache 2.4 to serve some static resources in a CORS-friendly way. I already have the following setting: Header always set Access-Control-Allow-Origin "*" However, for recent ...
0 votes
1 answer
2k views
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 "...
11 votes
3 answers
8k 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 ...