I have the following in /etc/nginx/sites-available/jobzumo:
server{
listen 80;
server_name 'jobzumo.com';
location = /favicon.ico { access_log off; log_not_found $
location /static/ {
root /home/justin/project;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
If I visit jobzumo.com, I will see the default django rocket ship and everything is working fine. If I visit my IP I will see the default ‘welcome to nginx’ page. If I change the server_name to my IP instead of the ‘jobzumo.com’ domain name, the opposite will happen(Rocket ship at IP, welcome to nginx at domain). Does anyone know how to get both the IP and domain name to point at my django project?
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!
Hello,
I can see that your website is already loading the Django installation. Would you mind sharing with the community how you solved the problem?
I believe that a possible issue that could be causing the problem is the server_name part in your configuration file, I would recommend not using quotes there.
Regards, 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.