Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2012-07-19T14:10:29Z by Sunit
SystemAdmin
SystemAdmin
3908 Posts
ACCEPTED ANSWER

Pinned topic Context Root problem

‏2012-07-16T04:30:29Z |
Hey.
I have a website with https with Verisign digital certificate.
Now, my client decided to use the webserver including a second digital certificate, so I had to enable a second virtualhost IP and leverage for the invocations.
My problem is that if I put www.mysite.com appears the first application, as the context root was designed that way, but my second application, called www.mysite.com / portal and the user must place the word "portal" to not go to the first application and invoke successfully the second application.
My virtual host is:

Listen 443

NameVirtualHost 172.18.21.80
NameVirtualHost 172.18.21.180

<VirtualHost 172.18.21.80:443>
SSLEnable
KeyFile "D: \ cert1 \ untilkey.kdb"
</ VirtualHost>
Ibm_ssl_module LoadModule modules / mod_ibm_ssl.so

<VirtualHost 172.18.21.180:443>
SSLEnable
KeyFile "D: \ cert \ unsytekey.kdb"

</ VirtualHost>
Ibm_ssl_module LoadModule modules / mod_ibm_ssl.so

And it works great.

Any suggestions?
Updated on 2012-07-19T14:10:29Z at 2012-07-19T14:10:29Z by Sunit
  • Sunit
    Sunit
    194 Posts
    ACCEPTED ANSWER

    Re: Context Root problem

    ‏2012-07-16T17:37:16Z  in response to SystemAdmin
    I am trying to understand the issue here. What you are saying is that if you use the second IP address, the user is directed to the application hosted on the first IP address?

    Check how you are directing the users to the first application. It might be mod_rewrite, redirect or META-REFRESH tag in your index.html. You should be able to easily fix either of these.

    • Sunit
    • SystemAdmin
      SystemAdmin
      3908 Posts
      ACCEPTED ANSWER

      Re: Context Root problem

      ‏2012-07-17T17:08:14Z  in response to Sunit
      Thank you.
      My problem is that if I put https://172.18.21.80, see my first site, but if I put https://172.18.21.180, there is also my first site.
      I https://172.18.21.180/portal place to go to my second site.
      In terms of DNS, IP 172.18.21.80 is www.site.com. And the IP is 172.18.21.180 intranet.site.com / portal.
      How to tell my customers they should put the word "portal" to be directed to my second site?
      Common users would place https://www.intranet.site.com, and that will lead to my first application, as the context root is "/". I've tried to change the context root of a word, but I get error.
      Any ideas?
      • Sunit
        Sunit
        194 Posts
        ACCEPTED ANSWER

        Re: Context Root problem

        ‏2012-07-19T14:10:29Z  in response to SystemAdmin
        This is because you are one DocumentRoot directive at server level. Instead use DocumentRoot within the VirtualHost. You can then use the index.html file in second DocumentRoot to redirect to /portal

        • Sunit