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
1 vote
1 answer
60 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
68 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
75 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
56 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
299 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/...
  • 121
0 votes
1 answer
175 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
658 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 ...
  • 1
1 vote
1 answer
1k 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|...
-1 votes
2 answers
305 views

Tool to create pre-compressed [Brotli] files

I am trying to generate pre-compressed brotli files in designated directories… Whatever html, css and js files are there have to be compressed to brotli. I found a rust tool here – https://github.com/...
  • 11
1 vote
0 answers
250 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....
  • 111
0 votes
1 answer
216 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 ...
  • 119
0 votes
0 answers
219 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
329 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}%{...
  • 791
0 votes
0 answers
195 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 ...
  • 101
0 votes
0 answers
721 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
117 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
2k 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
526 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 ...
  • 133
2 votes
2 answers
1k 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
38 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 ...
  • 101
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 ...
  • 123
0 votes
0 answers
7k 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
1k 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 ...
  • 133
0 votes
1 answer
567 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 ...
  • 3,473
0 votes
0 answers
807 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 ...
  • 210
0 votes
2 answers
3k 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 ...
  • 3
1 vote
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 ...
  • 263
5 votes
2 answers
14k 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
12k 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 ...
  • 247
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
659 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 ...
  • 145
1 vote
2 answers
3k 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
2k 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 --&...
  • 257
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 ...
  • 119
0 votes
1 answer
86 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 ...
  • 700
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 ...
  • 1
12 votes
1 answer
23k 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 ...
  • 191
0 votes
0 answers
497 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
2k 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 ...
  • 405
1 vote
2 answers
4k 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 ...
  • 1,793
0 votes
1 answer
1k 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
6k 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 ...
0 votes
1 answer
3k views

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 ...
1 vote
1 answer
4k views

Nginx serve static files for flask app 404

I've tried numerous solutions of other posts, but nothing seems to work for me, I always get a 404 error, when trying to let nginx serve static files of my flask application. Somewhere in between all ...
0 votes
0 answers
78 views

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:\...
  • 938
1 vote
0 answers
32 views

Site farm server with multiple users - best aproach

I am buliding kind a hosting server for static sites, and i am wondering is it better and for what reasons to: 1) use linux users ( i dont need ssh or something advanced function, there is only ...
0 votes
1 answer
2k views

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, ...
  • 139
1 vote
0 answers
82 views

Route content using nginx if a specific condition is met

I have 2 LAN networks which are united w/ IPSec tunnel: 10.10.10.1/24 10.10.20.1/24 One of my internal sites is running on 10.10.10.50, which is serving users heavy content, such as 300-400MB ...
  • 69