After searching and browsing a lot through different articles, I still don’t have a solution for the following problem:
I get the Firefox error message:
The stylesheet https://www.xxxxxx.at/assets/css/main.css was not loaded because its MIME type, "text/plain", is not "text/css".
I’m running nginx:stable in Docker and use the following /etc/nginx/nginx.conf:
events {
worker_connections 1024;
}
http {
server_names_hash_bucket_size 64;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80 default_server;
listen [::]:80 default_server;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name XXXXXXXX;
root /site_data/XXXXXXXX;
index index.html index.htm;
location / { }
ssl_certificate /ssl/XXXXXXXX.pem;
ssl_certificate_key /ssl/XXXXXXXX.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off;
# modern configuration
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers off;
}
}
My website is basically:
<html>
<head>
...
<link rel="stylesheet" type="text/css" href="assets/css/main.css" />
...
</head>
<body>...</body>
</html>
Does anyone know a solution for this Firefox/Chrome problem?
2
Answers
This is resolved, seems to be a caching issue.
cache problem
Ctrl+Shift+R to reload browser page might fix it.