Using curl to test 1 server in a cluster

Hello!

Today I was checking some ssl certificates and I realized that I couldn’t test an specific server on my web cluster server  using this:

$ curl -H ‘Host: serverhost.com’ https://192.168.32.1/path

The reason is SNI. I won’t get into details but you can see more here.

So, to do that request, you can use:

$ curl -v --connect-to serverhost.com:443:192.168.32.1:443 https://serverhost.com/path

–connect-to seems to be a very useful option to solve that kind of issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s