Hey,
Thank you for the quick reply. I do have another server with the same configuration and Origin Certificates. When I reach my website via IP address it will redirect to the domain name with HTTPs.
I checked file config /etc/nginx/sites-available/ … , it’s exactly the same, Also the settings from cloud flare dashboard, I am 100% sure I adjusted all settings correctly.
Question! why when I reach my website via IP it doesn’t redirect to the domain name?
FYI : server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/key.pem;
ssl_client_certificate /etc/ssl/cloudflare.crt;
ssl_verify_client on;
server_name yyy.com www.yyy.com;
root /var/www/yyy.com/html;
index index.html index.htm index.nginx-debian.html;
location / {
try_files $uri $uri/ =404;
}
}