# Chef Server certificates Problem

**URL:** <https://discourse.chef.io/t/chef-server-certificates-problem/15281>\
**Category:** Chef Infra (archive)\
**Created:** [May 31, 2019, 10:26am UTC](https://discourse.chef.io/t/chef-server-certificates-problem/15281 "2019-05-31T10:26:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesid01](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@thesid01](https://discourse.chef.io/u/thesid01)\
**Post date:** [May 31, 2019, 10:26am UTC](https://discourse.chef.io/t/chef-server-certificates-problem/15281/1 "2019-05-31T10:26:42Z")

</div>

Connecting to host 192.168.60.12:30578  
ERROR: The SSL cert is signed by a trusted authority but is not valid for the given hostname  
ERROR: You are attempting to connect to: '192.168.60.12'  
ERROR: The server's certificate belongs to 'chef-server-1-b5ff9fff-fp2mg'

TO FIX THIS ERROR:

The solution for this issue depends on your networking configuration. If you  
are able to connect to this server using the hostname chef-server-1-b5ff9fff-fp2mg  
instead of 192.168.60.12, then you can resolve this issue by updating chef\_server\_url  
in your configuration file.

If you are not able to connect to the server using the hostname chef-server-1-b5ff9fff-fp2mg  
you will have to update the certificate on the server to use the correct hostname.

The problem is that i cannot access my server by hostname  
What to do?

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [May 31, 2019, 10:36am UTC](https://discourse.chef.io/t/chef-server-certificates-problem/15281/2 "2019-05-31T10:36:37Z")

</div>

Fix your infra so naming is correct, before doing anything else that should be what to do.

As last case workaround you can edit your local hosts file so the name resolve to the ip, in windows the file has to be created under windows/etc/drivers/hosts (if I remember correctly)

---

<div class="post-metadata">

**Author:** ![thesid01](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@thesid01](https://discourse.chef.io/u/thesid01)\
**Post date:** [May 31, 2019, 10:41am UTC](https://discourse.chef.io/t/chef-server-certificates-problem/15281/3 "2019-05-31T10:41:29Z")

</div>

Actually I am accessing chef-server from windows workstation and my chef server is hosted on a vm which i can access through ip address but it is saying i have to access it through host name.
