# Config https in nginx

**URL:** <https://community.grafana.com/t/config-https-in-nginx/9963>\
**Category:** General\
**Created:** [August 26, 2018, 10:22am UTC](https://community.grafana.com/t/config-https-in-nginx/9963 "2018-08-26T10:22:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vhp1360](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@vhp1360](https://community.grafana.com/u/vhp1360)\
**Post date:** [August 26, 2018, 10:22am UTC](https://community.grafana.com/t/config-https-in-nginx/9963/1 "2018-08-26T10:22:22Z")

</div>

Hello, I tried to put grafana behind of nginx in secure mode. below is my nginx config file:  
server {  
listen 440;  
ssl on;  
server\_tokens off;  
ssl\_certificate /ssl/nginx.crt;  
ssl\_certificate\_key /ssl/nginx.key;  
ssl\_ciphers “ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256”;  
ssl\_protocols TLSv1 TLSv1.1 TLSv1.2;  
ssl\_prefer\_server\_ciphers on;  
ssl\_session\_cache shared:SSL:10m;  
ssl\_session\_timeout 5m;  
client\_max\_body\_size 21m;  
location / {  
auth\_basic “Restricted”;  
auth\_basic\_user\_file /htpasswd/pwdGrafana;  
proxy\_pass [http://127.0.0.1:3000/;](http://127.0.0.1:3000/;)  
proxy\_set\_header Host $host;  
proxy\_set\_header X-Real-IP $remote\_addr;  
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;  
}  
}

and not any change in grafana.ini file.  
when I tried \_https://172.20.10.10:440/ \_ I encountred **{“message”:“Basic auth failed”}** message in page
