Title: Problem Configuring Static Files in OpenLiteSpeed with Django Project


Hello everyone!

I'm trying to set up a Django project on OpenLiteSpeed and am facing some challenges in properly configuring the static files.

Based on the user manual's recommendations, I've set STATIC_URL and STATIC_ROOT in my settings.py as follows:

pythonCopy code
STATIC_URL = '/python/static/'
STATIC_ROOT = '/usr/local/lsws/Example/html/growpyme/staticfiles'

Here's my directory structure:

markdownCopy code
- growpyme/
- staticfiles/
- main/
- static/
- carta/
- static/
- growpyme/
- static/

The issues I'm encountering are, for example:

vbnetCopy code
traditional-italian-food-world-tourism-day.jpg:1 - Failed to load resource: the server responded with a status of 404
/#:1 - Refused to apply style from 'https://menuweb.cl/python/static/main/home.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

If anyone has previously configured Django static files in OpenLiteSpeed and can offer guidance, it would be greatly appreciated.

Thank you in advance!

<!DOCTYPE html>
<html lang="es">
{% load static %}
<meta charset="UTF-8">
<title>App Menu Web</title>
<!-- Incluir Bootstrap CSS y JS usando un CDN para mejor compatibilidad -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Vincula tus hojas de estilo CSS -->
<link rel="stylesheet" type="text/css" href="{% static 'main/home.css' %}">

<!-- Vincula tus librerías o frameworks JS -->
<script src="{% static 'jquery.js' %}"></script>
<link href="https://fonts.googleapis.com/css2?f...0&family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
Last edited: