I managed to get ngnix configured and its running when i try doing things like mocorner.com/static but when I try static.mocorner.com its taking me to landing page.
Below is my ngnix config file, can anyone advise about how I can resolve this issue? plus how can I separate the logs for each static and media?
upstream backend {
server 127.0.0.1:8080;
}
server {
listen 80;
access_log /home/mocorner/moapps/mocorner/logs/static-nginx-access.log;
error_log /home/mocorner/moapps/mocorner/logs/static-nginx-error.log;
location / {
proxy_pass http://backend;
include /etc/nginx/proxy.conf;
}
location /static {
root /home/mocorner/moapps/mocorner/app/static;
}
location /media {
root /home/mocorner/moapps/mocorner/media;
}
}
1 Answer