Не могу найти ошибку в доступе к сайту.
server {
listen 80;
server_name name.ru www.name.ru;
return 301 https://name.ru$request_uri;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/bundle.crt;
ssl_certificate_key /etc/ssl/name.ru.key;
server_name name.ru;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off;
location = /favicon.ico {
alias /root/Social/favicon/favicon.ico;
}
location /static/ {
root /root/Social;
}
location /image/ {
root /root/Social/Images;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
Ошибка:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-03-30 20:48:41 MSK; 4min 9s ago
Docs: man:nginx(8)
Process: 17364 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Mar 30 20:48:41 name systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 30 20:48:41 name nginx[17364]: nginx: [emerg] BIO_new_file("/etc/ssl/.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/.crt','r') error:2006D080:BIO routines:BIO_new_file:no such f
Mar 30 20:48:41 name nginx[17364]: nginx: configuration file /etc/nginx/nginx.conf test failed
Mar 30 20:48:41 name systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Mar 30 20:48:41 name systemd[1]: nginx.service: Failed with result 'exit-code'.
Mar 30 20:48:41 name systemd[1]: Failed to start A high performance web server and a reverse proxy server.