Topic
  • 3 replies
  • Latest Post - ‏2012-07-19T14:10:29Z by Sunit
SystemAdmin
SystemAdmin
3908 Posts

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
    199 Posts

    Re: Context Root problem

    ‏2012-07-16T17:37:16Z  
    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

    Re: Context Root problem

    ‏2012-07-17T17:08:14Z  
    • Sunit
    • ‏2012-07-16T17:37:16Z
    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
    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
    199 Posts

    Re: Context Root problem

    ‏2012-07-19T14:10:29Z  
    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?
    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