Nginx ssl configuration for subdomain -
i have website , multiple subdomains. on each subdomain, except one, use cms generates it's own ssl using let's encrypt. on remaining subdomain want add own certificate cloudflare. generated certificate put in /var/www/my/
now. testing. , in nginx configured block:
server{ listen 443 ssl http2; listen [::]:443 ssl http2; ssl_certificate /var/www/my/fullchain.cer; ssl_certificate_key /var/www/my/my.domain.com.key; root /var/www/my; index index.php index.html; server_name my.domain.com; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param script_filename /var/www/my/$fastcgi_script_name; } location ~ /\.ht { deny all; } }
there seems problem implementation because my.domain.com works else error cloudflare: error 525: ssl handshake failed.
any ideas i'm doing wrong?
thank you
edit:
this conf file cms. how set certificate.
server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name sub.domain.com; root /var/www/sub/system/nginx-root; ssl_certificate /home/domain/.acme.sh/sub.domain.com/fullchain.cer; ssl_certificate_key /home/domain/.acme.sh/sub.domain.com/sub.domain.com.key; include /var/www/sub/system/files/ssl-params.conf; location / { proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header x-forwarded-proto $scheme; proxy_set_header x-real-ip $remote_addr; proxy_set_header host $http_host; proxy_pass http://127.0.0.1:2369; } location ~ /.well-known { allow all; } client_max_body_size 50m; }
Comments
Post a Comment