Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use curl on a Red Hat Enterprise Linux Server release 6.1. When I try to use URL with HTTPS it gives an error message "Couldn't resolve host". But for the same URL when tried with HTTP ( response is successful.

[root@localhost /]# curl --proxy-user username:password -L -i
curl: (6) Couldn't resolve host ''
[root@localhost /]#

Can there be anything wrong with my SSL configuration here. Any help is greatly appreciated...

share|improve this question
I don't think that you got any problems with SSL/TSL. Have you tried 'getent hosts' ? Does the site redirect your web browser to another site when you use https compared with http? What dns-servers do you use, do they give the right answers? I do think that you have problems with DNS or generally, name resolvment. Could be that and a combination wit redirect of website to different servers depending on http or https. – Anders Jun 19 '12 at 11:42
Do you have to use a proxy both for HTTP and HTTPS? How are you configuring the proxy? It looks like curl is only using the proxy for HTTP requests... – golimar Jun 19 '12 at 16:17
Thank you... Guided by your comments I found the solution. – Indika K Jun 20 '12 at 18:10
up vote 0 down vote accepted

The problem was OK after configuring proxy for HTTPS as follows.

export https_proxy=http://proxy:8080/
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .