I found a mistake in config , following is the correct one :
server {
listen 80;
server_name atif.hippochat.io;
rewrite ^ https://$http_host$request_uri? permanent;
}
server{
listen 443 ssl http2;
server_name atif.hippochat.io;
root /apps/www/html/index.html;
ssl on;
#ssl_certificate /etc/letsencrypt/live/url.capuchin.co/fullchain.pem;
#ssl_client_certificate /etc/letsencrypt/live/url.capuchin.co/chain.pem;
#ssl_certificate_key /etc/letsencrypt/live/url.capuchin.co/privkey.pem;
}
sudo nginx -T | grep -i atif.hippochat.io gives :
nginx: [warn] conflicting server name "kfgapp.yelo.red" on 0.0.0.0:80, ignored
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64; ignoring server_names_hash_bucket_size
nginx: [warn] conflicting server name "kfgapp.yelo.red" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "pizza123.yelo.red" on 0.0.0.0:443, ignored
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64; ignoring server_names_hash_bucket_size
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
server_name atif.hippochat.io ;
server_name atif.hippochat.io ;
while ls -l /apps/www/html/index.html gives :
-rwxr-xr-x 1 root root 10 Oct 6 20:30 /apps/www/html/index.html