Help required regarding tomcat configuration for subdomain setup

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tasneemakhtarkhan
    New Member
    • Feb 2007
    • 3

    Help required regarding tomcat configuration for subdomain setup

    Hi !

    Can anyone help me in sorting following problem

    I am trying to create subdomains e.g hub.youpark.com , youandus.youpar k.com.
    i have entered appropriate entries in httpd.conf and server.xml. The problem is with URL's.

    When someone enters the URL

    hub.youpark.com
    it changes to:
    https://www.youpark.com/isv/isvLogin.jsp

    I have used mod_write options, but it gives the servlet error(Resource not found)

    It would be highly appreciated, if someone help me to come out from this problem

    Regards
    TAK
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by tasneemakhtarkh an
    Hi !

    Can anyone help me in sorting following problem

    I am trying to create subdomains e.g hub.youpark.com , youandus.youpar k.com.
    i have entered appropriate entries in httpd.conf and server.xml. The problem is with URL's.

    When someone enters the URL

    hub.youpark.com
    it changes to:
    https://www.youpark.com/isv/isvLogin.jsp

    I have used mod_write options, but it gives the servlet error(Resource not found)

    It would be highly appreciated, if someone help me to come out from this problem

    Regards
    TAK
    Could you post the appropriate sections of your httpd.conf and server.xml files?

    Comment

    • tasneemakhtarkhan
      New Member
      • Feb 2007
      • 3

      #3
      Originally posted by Motoma
      Could you post the appropriate sections of your httpd.conf and server.xml files?
      We are using apache - tomcat combination. We have only one webapp i.e. only one web-inf directory with web.xml containing servlet entries.

      httpd.conf entry is

      <VirtualHost 83.138.166.43:8 0>
      ServerAlias www.hub.youpark .com
      ServerName hub.youpark.com
      DocumentRoot /home/uakram/public_html/isv
      <Directory "/home/uakram/public_html/isv">
      Options Indexes FollowSymLinks
      </Directory>
      <Directory "/home/uakram/public_html/resources">
      Options +Includes
      </Directory>
      JkUnmount /*.php ajp13
      JkUnmount /*.shtml ajp13
      JkMount /* ajp13
      <Location "/home/uakram/public_html/WEB-INF/">
      AllowOverride None
      deny from all
      </Location>
      </VirtualHost>


      and server.xml entry is

      <Host appBase="webapp s" name="hub">
      <Alias>www.hub. youpark.com</Alias>
      <Alias>hub.youp ark.com</Alias>
      <Valve className="org. apache.catalina .valves.AccessL ogValve" directory="logs "
      prefix="access_ log." suffix=".txt" pattern="common "/>
      <Context path="" docBase="/home/uakram/public_html/isv" debug="0" crossContext="t rue"/>
      </Host>

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        This link seems to be the exact thing you are looking for.

        Comment

        • tasneemakhtarkhan
          New Member
          • Feb 2007
          • 3

          #5
          Originally posted by Motoma
          This link seems to be the exact thing you are looking for.

          Thankyou for all your help but we are done installing tomcat and apache. What we are currently doing is configuring multiple subdomains. If the request is served by apache i.e. php and html pages the subdomain works fine eg, if you see corp.youpark.co m it works fine. When user browses through this site the address remains corp.youpark.co m as this is mainly html. But if you browse through a subdomain that is served by tomcat such as hub.youpark.com the address changes to the main domain which is www.youpark.com .


          Anxiously waiting for your reply.

          Regards

          Comment

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            Originally posted by tasneemakhtarkh an
            Thankyou for all your help but we are done installing tomcat and apache. What we are currently doing is configuring multiple subdomains. If the request is served by apache i.e. php and html pages the subdomain works fine eg, if you see corp.youpark.co m it works fine. When user browses through this site the address remains corp.youpark.co m as this is mainly html. But if you browse through a subdomain that is served by tomcat such as hub.youpark.com the address changes to the main domain which is www.youpark.com .


            Anxiously waiting for your reply.

            Regards
            I understand that. The task of doing this is called setting up Virtual Hosts. Seeing that you configuration had JK declarations, I assumed that you were using mod_jk, and having never used Tomcat myself, I decided to refer you to a site claiming to be a tutorial on "Configurin g Tomcat5 and Apache2 with VirtualHosts using mod_jk."
            Did you go through all four pages of the tutorial? It seemed to delineate the Virtual Host process quite well.

            Comment

            Working...