Question
Nginx "welcome to Nginx" only on Moblie Devices
I made a website for a friend for his carpet cleaning business. I followed https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 exactly. I also have my own website set up and it works perfectly. But for the carpet cleaning business when I am on the computer I get the website as it is suppose to be but when I go to my phone or any other phone that has never accessed the site I get the “welcome to nginx” page. I doubled checked ALL settings with my website and his and the only difference is the names of things, such as domains and other files. I used Django as my frame work and am hosting it on ubuntu 16.04 server on digital ocean. The carpet cleaning website is : chiltoncarpetcleaning.com.
I did move the sock file but this works fine for my site and I doubt that would make this error
/etc/systemd/system/gunicorn.service:
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=username
Group=www-data
WorkingDirectory=/home/username/app
ExecStart=/home/username/app/env/bin/gunicorn –workers 3 –bind unix:/home/username/app.sock app.wsgi:application
[Install]
WantedBy=multi-user.target
/etc/nginx/sites-available/app
server {
listen 80 defaultserver;
servername chiltoncarpetcleaning.com www.chiltoncarpetcleaning.com;
root /home/username/app;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/username/app;
}
location /media/ {
root /home/username/app;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/username/app.sock;
}
}
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×