Seeing this instead of the website you expected?

Discussion in 'Apache' started by jagdishp, Sep 6, 2007.

  1. #1
    Hi
    I have 2 web application instaaled on tomcat server. I have to show the certificate for both applications. when i am trying to access my application it shows test page for apache instead of showing my page.
    i had written the foolwing code in httpd.conf file -

    <VirtualHost *:443>
    ServerAdmin jagdish.patil@aftek.com
    ServerName www.wonder.com
    SSLEngine On
    SSLCertificateFile conf/ssl/rcs.cert
    SSLCertificateKeyFile conf/ssl/rcs.key
    DocumentRoot "C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/rcs-wonder"
    JkMount /*.jsp ailWorker
    JkMount /*.do ailWorker
    JkMount /RequestServer ailWorker
    JkMount /ResponseServer ailWorker

    </VirtualHost>

    <VirtualHost *:444>
    ServerAdmin jagdish.patil@aftek.com
    ServerName www.rohan-tapovan.com
    SSLEngine On
    SSLCertificateFile conf/ssl/rcs.cert
    SSLCertificateKeyFile conf/ssl/rcs.key
    DocumentRoot "C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/rcs-rohan-tapovan"
    JkMount /*.jsp ailWorker
    JkMount /*.do ailWorker
    JkMount /RequestServer ailWorker
    JkMount /ResponseServer ailWorker

    </VirtualHos>

    It shows common certificate, but cant show the home page for that site.
    Solutions always welcome...
    anyone know about this problem...mail me at- jagdish.fc@gmail.com
    Thanks in advance
    Jagdish
     
    jagdishp, Sep 6, 2007 IP
  2. greys

    greys Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need them both to be VirtualHost *:443 for starters.

    Are you getting any errors in Apache when you restart it?
     
    greys, Sep 6, 2007 IP
  3. randomIntellections

    randomIntellections Well-Known Member

    Messages:
    985
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    180
    #3

    No , you cannot have two certs on a single ip , do you view the second by
    https://domain.com:444 ?
     
    randomIntellections, Sep 6, 2007 IP
  4. jagdishp

    jagdishp Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No. I dont get any error while starting apache. but if i give both as 443 then it gives Forbidden error for second one i.e for rohan-tapovan


    Thanks
     
    jagdishp, Sep 7, 2007 IP
  5. randomIntellections

    randomIntellections Well-Known Member

    Messages:
    985
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    180
    #5
    setup the two ssl hosts on two different ip's
     
    randomIntellections, Sep 7, 2007 IP
  6. greys

    greys Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    But this is the config using the same cert for both websites, so it should work even from one IP

    There's going to be a warning message in your browser about the certificate not matching one of the domain names, of course...
     
    greys, Sep 8, 2007 IP