Jump to content

apache configuration: https vs http


ttati

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.