Greetings. I am following the tutotrial how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 and its great. I uploaded my project files and ran the development server (manage.py runserver ) it worked but my web content dont show up. All I see is my actual code and css. Like this
<!DOCTYPE html>
<html>
<head>
<title>Log-in</title>
<link href="/static/base.css" type="text/css" rel="stylesheet">
<link href="base.css" type="text/css" rel="stylesheet">
<style>
h2 {
font-family: Arial;
}
a {
color: black;
text-decoration: cyan;
}
* {
font-family: Cambria, Cochin, Georgia, Times, Times New Roman, serif;
}
* {
background-color: whitesmoke;
border: 50px;
/*border-style: solid*/
}
.action-list {
text-align: center;
height: 100%;
width: 20%;
min-width: 300px;
max-width: 1600px;
min-height: 150px;
max-height: 1200px;
padding: 10px 90px 10px 350px;
background-color: white;
border: 5px;
margin: 5px 80px 65px 390px;
overflow: scroll;
margin: 60px 80px 65px 390px;
}
#info {
text-align: center;
width: 173%;
background-color: white;
margin: 5px 620px 5px -279px;
}
#info2 {
text-align: left;
width: 119%;
padding: 10px 40px 10px -90px;
background-color: white;
margin: 5px 80px 65px 10px;
}
#pro {
padding: 10px 400px 40px 10px;
background-color: white;
margin: -8px 5px 30px -280px;
width: 65%;
}
#fiona {
border-radius: 100%;
margin: -8px 5px -20px -140px;
}
#more {
background-color: white;
margin: -29px 5px 5px -280px;
padding: 5px 5px 5px -5px;
}
#name {
margin: -5px 5px -5px -50px;
padding: 5px 5px 5px -5px;
width: 65%;
}
Somebody help.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
It sounds like that your Nginx configuration is not correct, I would usually use the following server block:
server {
listen 80;
server_name server_domain_or_IP;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/sammy/myproject;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/sammy/myproject/myproject.sock;
}
}
For anyone who comes across this in the future, here is a link to the tutorial:
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.