By redpanda
I am using “one-click” django set up. Website was working fine last week, but I found it cannot redirect to my home page anymore today. It shows: “Welcome to nginx! If you see this page, the nginx web server is successfully installed and working. Further configuration is required.” After searching on old questions, I looked at my “default” file under /etc/nginx/sites-available directory, it already has “root /var/www/html;”. I tried to set listen port to 8080 as well, but it did not work. I do not know what to do now, anyone can help please?
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 the Nginx server block does not contain the required reverse proxy rules to forward the traffic to your Django app as described here:
Example:
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;
}
}
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.