Вот мой код:

Я создал веб-сайт для небольшого бизнеса. Все отлично работает в Chrome, Edge и т.д., но в Safari просто выскакивает сообщение Welcome to nginx! по умолчанию. Я настроил SSL с помощью Certbot. Вот конфигурация на nginx:

    listen 80;
    server_name ccomputercenter.com www.ccomputercenter.com;
    location /static/ {
        alias /home/cristi/SiteCMR/cmr_project/staticfiles/;
    }

    location /media/ {
        alias /home/cristi/SiteCMR/cmr_project/media/;
    }

    location / {
        proxy_pass http://unix:/home/cristi/SiteCMR/cmr_project/gunicorn.sock;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/ccomputercenter.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/ccomputercenter.com/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 = www.ccomputercenter.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    if ($host = ccomputercenter.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    server_name ccomputercenter.com www.ccomputercenter.com;
    return 404; # managed by Certbot
}```



I've read some other articles but I can't seem to find any exact information for this. Thank you all !
Вернуться на верх