running HTTP:// and HTTPS:// concurrently

hi there

i have a hosted apache application for internal and external access.

i have set up that the virtual server created uses SSL. when i connect via the https:// it connects fine.

however when i use http:// as the pre-fix, i get a blank page...?


is there a setting on setup that i have missed? or why does it do this?


thanks in advance
LVL 12
minichickenAsked:
Who is Participating?
 
m1tk4Commented:
>>how would i go about this? how many virtual servers would i need set up?

2. One for <LAN_IP>:80 and <WAN_IP>:443 and one for <WAN_IP:80> with Deny from all.
0
 
m1tk4Commented:
Post your <VirtualHost> container here.
0
 
minichickenAuthor Commented:
SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none
SSLLog logs/SSL.log
SSLLogLevel info



<VirtualHost <LAN_IP>:80>

    DocumentRoot "<PATH>\htdocs"
    ScriptAlias /cgi-bin/ "<PATH>/cgi-bin/"
    <Directory "<PATH>/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>    

       SSLEngine On
       SSLCertificateFile conf/ssl/my-server.cert
       SSLCertificateKeyFile conf/ssl/my-server.key

</VirtualHost>
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
m1tk4Commented:
<VirtualHost <LAN_IP>:80>

This one catches your http:// requests, your https:// request go to port 443 instead of 80 and are handled either in a different container or in default config.

0
 
minichickenAuthor Commented:

how should my Virtualhost(s) be set up?

can you give me an example?

thanks!
0
 
minichickenAuthor Commented:
would it be something like this:

<VirtualHost <LAN_IP>:80>
    DocumentRoot "<PATH>\htdocs"
    ScriptAlias /cgi-bin/ "<PATH>/cgi-bin/"
    <Directory "<PATH>/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>    
</VirtualHost>



<VirtualHost <WAN_IP>:443>
    DocumentRoot "<PATH>\htdocs"
    ScriptAlias /cgi-bin/ "<PATH>/cgi-bin/"
    <Directory "<PATH>/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>    
       SSLEngine On
       SSLCertificateFile conf/ssl/my-server.cert
       SSLCertificateKeyFile conf/ssl/my-server.key
</VirtualHost>

0
 
m1tk4Commented:
Yes, you could even do it in one container:

<VirtualHost <WAN_IP>:443 <LAN_IP>:80>

Not sure about 1.3, in 2.0 you definitely can.
0
 
minichickenAuthor Commented:
maybe you can help me out here man.

i have a web based applicaton that is hosted by apache. People on the LAN connect via the LAN IP: "http://10.0.0.1" (for example). People connecting from outside the LAN connect to the WAN IP: "http://199.99.2.99" (for example).

the index.html page has 2 hyperlinks. The first link LINK_1 points to the path "http://10.0.0.1/application_path/application". LINK_1 is meant for all internal staff to connect. Naturally hyperlink LINK_2 links to the path "http://199.99.2.99/application_path/application".

what i want to achieve from this is to implement SSL over the WAN connection and not the LAN.

how would i go about it?

0
 
m1tk4Commented:
Just make sure

a) your links are absolute (i.e. include full URL starting with http:/...)
b) the LINK2 starts with https://, not http.

To block WAN users from getting to the site through regular http you can set up a second VirtualServer container with <WAN_IP>:80 and do a Deny from all in it.

Is there any particular reason why you have to use IP's instead of hostnames?
0
 
minichickenAuthor Commented:

This brings me to my first issue where http:// gets a blank page...?

basically any URL with the WAN_IP in it must be "https://..."; and any URL with the LAN_IP must be "http://..."

To answer your question, there isn't a hostname set for the WAN_IP.

how would i go about this? how many virtual servers would i need set up?

could i have something like this:


SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none
SSLLog logs/SSL.log
SSLLogLevel info



<VirtualHost <LAN_IP>:80>
    DocumentRoot "<PATH>\htdocs"
    ScriptAlias /cgi-bin/ "<PATH>/cgi-bin/"
    <Directory "<PATH>/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>    
</VirtualHost>



<VirtualHost <WAN_IP>:80>
    DocumentRoot "<PATH>\htdocs"
    ScriptAlias /cgi-bin/ "<PATH>/cgi-bin/"
    <Directory "<PATH>/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>    

       SSLEngine On
       SSLCertificateFile conf/ssl/my-server.cert
       SSLCertificateKeyFile conf/ssl/my-server.key

</VirtualHost>
0
 
minichickenAuthor Commented:
thanks!

i will give it atry!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.