Nginx отображает неправильный веб-сайт. Кто-нибудь знает, почему?
Мой сайт 1 Nginx .conf файл рендерит сайт 2 на моем сервере. Таким образом, оба сайта отображают сайт 2. Я хочу, чтобы сайт 1 отображал сайт Django. Сайт 2 - это обычный HTML-сайт. Файлы для обоих сайтов расположены в /home/webserver, а не в /var/www.
Веб-сайт 1:
# the upstream component nginx needs to connect to
upstream django {
server unix:///home/webserver/exo_dashboard/dashboard/exo.sock;
}
# configuration of the server
server {
listen 80;
server_name beta.exobot.xyz www.beta.exobot.xyz;
charset utf-8;
# max upload size
client_max_body_size 75M;
# Django media and static files
location /media/ {
alias /home/webserver/exo_dashboard/dashboard/media;
}
location /static/ {
alias /home/webserver/exo_dashboard/dashboard/static/;
}
# Send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /home/webserver/exo_dashboard/dashboard/uwsgi_params;
}
}
Вебсайт 2:
server {
root /home/webserver/website;
index index.html index.htm index.nginx-debian.html;
server_name exobot.xyz www.exobot.xyz;
location / {
try_files $uri $uri/ =404;
}
location = /arc-sw.js {
proxy_pass https://arc.io;
proxy_ssl_server_name on;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/exobot.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/exobot.xyz/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = exobot.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name exobot.xyz;
return 404; # managed by Certbot
}