Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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...

share|improve this question
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 '12 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 '12 at 16:17
    
Thank you... Guided by your comments I found the solution. –  Indika Jun 20 '12 at 18:10

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.