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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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