ttati Posted September 9, 2008 Share Posted September 9, 2008 Hello, I've an httpd.conf like this: <VirtualHost ipAddress:444> ServerName myServer DocumentRoot /mydir AddDefaultCharset ISO-8859-1 SetEnv URL_SCHEME https # ssl options SSLEngine on SSLCertificateFile /myCert.crt SSLCertificateKeyFile /myKey.key ...... </VirtualHost > It works if I write url in my browser (https://myServer/mypage.html). Now I have to get an html page from myServer to myServer. My java code,running in myServer, is: String url = PROTOCOL+"://"+SERVERNAME+":"+PORT+"mypage.html?code=" + iObjCode +"&__PROGRESS_STATUS=idle&mode=1&country="+country+afterUrl; URL url = new URL(url); java.net.HttpURLConnection httpURLConnection = (java.net.HttpURLConnection)url.openConnection(); httpURLConnection.setRequestMethod("GET"); httpURLConnection.setDoInput(true); int code = httpURLConnection.getResponseCode ( ) ; BufferedReader in = new BufferedReader( new InputStreamReader (httpURLConnection.getInputStream())); String line=null; //for each line if find a file reference, modify it while ((line = in.readLine()) != null) { line=HtmlUtility.getLine(line,filesName); page=page+line; } It doesn't work If I write PROTOCOL=https,PORT =444 It doesn't work I obtain SSL Exception Unrecognize message SSL I 'd like to run java code and get html page without to use https Someone Can help me? What option I have to put in Apache config file to allow server to call it self without https? Link to comment https://forums.phpfreaks.com/topic/123439-apache-configuration-https-vs-http/ Share on other sites More sharing options...
JonnoTheDev Posted September 9, 2008 Share Posted September 9, 2008 Add a virtual host entry for the non ssl domain name also Link to comment https://forums.phpfreaks.com/topic/123439-apache-configuration-https-vs-http/#findComment-637514 Share on other sites More sharing options...
corbin Posted September 10, 2008 Share Posted September 10, 2008 <VirtualHost ipAddress:<not 444>> ServerName myServer DocumentRoot /mydir AddDefaultCharset ISO-8859-1 # ssl options SSLEngine off ...... </VirtualHost > Link to comment https://forums.phpfreaks.com/topic/123439-apache-configuration-https-vs-http/#findComment-638065 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.