Hi,--Sorry for the slight OT but after days of search I have no clue.Following this DigitalOcean tutorial I was able to setup Django + Postgres + Gunicorn + NGINX running Django on my root,Now I'd like to change and have something like this:mydomain.com -> static HTMLmydomain.com/pmapp -> Django appI created two server blocks in NGINX, one for my static website:
server {
listen 80;
listen [::]:80;
root /var/www/html/officinecartogra
fiche .it;index index.html index.htm index.nginx-debian.html;
server_name www.officinecartografiche.it, officinecartografiche.it, 207.154.206.172;
location / {
try_files $uri $uri/ =404;
}
}
and one for my django app:
server {
listen 80;
listen [::]:80;
server_name www.officinecartografiche.it, officinecartografiche.it, 207.154.206.172;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/geouser/pmapp;
}
location /pmapp {
#include proxy_params;
proxy_pass http://unix:/home/geouser/
pmapp/pmapp.sock; proxy_redirect http://www.
officinecartografiche.it:8000/ http://$host/pmapp/;pmapp/ proxy_set_header SCRIPT_NAME /pmapp;
}
}
and added this to settings.py:
FORCE_SCRIPT_NAME = '/pmapp'
WHAT AM I DOING WRONG??THANKS FOR YOUR HELP!!!
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b1ee39d2- .fd04-4727-88e1-e130def5dd37% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACOk0TxFHYe4%2Boye79qfacv9%3Dc13CGVbjPgNYxhR2gU22KsFow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment