0

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 (http://www.google.lk) response is successful.

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

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

3
  • 1
    I don't think that you got any problems with SSL/TSL. Have you tried 'getent hosts www.google.lk' ? 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, 2012 at 11:42
  • 2
    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, 2012 at 16:17
  • Thank you... Guided by your comments I found the solution.
    – Indika K
    Jun 20, 2012 at 18:10

1 Answer 1

1

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

export https_proxy=http://proxy:8080/

You must log in to answer this question.

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