Здравствуйте.
Нужен origin сертификат от cloudflare (который устанавливается на сервер), cloudflare дал csr и private key.
Загрузил:
/etc/ssl/cert.pem
/etc/ssl/key.pem
в nginx конфиге добавил (в конце)
# WebinolyNginxServerStart
server {
listen 80;
listen [::]:80;
server_name site.com www.site.com;
access_log off;
error_log /var/log/nginx/site.com.error.log;
root /var/www/site.com/htdocs/public;
index index.php index.html index.htm;
include common/auth.conf;
# WebinolyCustom
include apps.d/site.com-nginx.conf;
# WebinolyCustomEnd
include common/phpx.conf;
include common/locations.conf;
include common/header.conf;
include /var/www/site.com/*-nginx.conf;
include /etc/nginx/conf.d/*.conf.srv;
}
# WebinolyNginxServerEnd
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/cert.key;
server_name site.com;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
location / {
root /var/www/site.com/htdocs/public;
index index.html;
}
}
site.com менял на свой домен, но nginx выдает ошибку с таким кодом, можете подсказать что я делаю не так?