Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I made a new Project in Django. On my local Computer it is working just fine so I tried to make it public here on DigitalOcean. I found a Tutorial which I followed. Now everything works just fine, but one little thing. Somehow the static CSS-files are not loading, which is really strange because the static images and javascript files are loading. In addition the admin page CSS files are all loaded correctly. I looked up the files on the server, which i uploaded via SFTP and all the static CSS files are on the correct place. I think it could be an Nginx Problem, but I am not sure, beacuse i am new to Nginx. I asked this Question on 2 Websites now and nobody seems to be able to help me. I hope someone can help me here.
(Projectname: bhitweb2) static files settings.py:
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATIC_FILES = [
os.path.join(BASE_DIR, 'accounts/static/'),
os.path.join(BASE_DIR, 'daten/static/'),
]
My Nginx:
server {
listen 80;
server_name <myserverip>;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/djangodeploy/bhitweb2;
}
location /media/ {
root /home/djangodeploy/bhitweb2;
}
location /css {
root /home/djangodeploy/bhitweb2/static;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/djangodeploy/bhitweb2/bhitweb2.sock;
}
}
error Message of every CSS file
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
link to any stylesheet in HTML:
{% load static %}
<link rel="stylesheet" type="text/css" media="screen" href="{% static 'css/main.css' %}/" />
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
Ruz
Ruz
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e
markatango
gouskova
Andrew J Montanus