The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

parked domain problem...

Discussion in 'General Discussion' started by Diatone, Aug 3, 2002.

  1. Diatone

    Diatone Well-Known Member

    Joined:
    Aug 22, 2001
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Hello.

    I am just wondering something. I parked a domain called curbdiver.net ontop of curbdiver.com in WHM. I also installed JSP servlets on curbdiver.com. But when you go to www.curbdiver.com it displays fine, but www.curbdiver.net, and the IP for the site, gives tomcat 404 errors. Can anyone help PLEASE? Thanks!
     
  2. Diatone

    Diatone Well-Known Member

    Joined:
    Aug 22, 2001
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Ok... I've figured it out myself finally. Took a bit. But I got it. Anyone that may be reading this thread, and want to know how I did this, well, listen up..

    Ok. It's pretty simple. All you need to do is navigate to the directory below (may be different if you have a different version of tomcat installed)
    /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build/conf

    Once there, open up your server.xml file, and get ready to edit some lines.. They are near the bottom of the file. They look like
    &Host name=&www.curbdiver.com&&
    &Context path=&& reloadable=&true& docBase=&/home/curbdive/public_html& debug=&1&/&
    &/Host&

    Well, I needed it to work with curbdiver.net and www.curbdiver.net - so I added the following:

    &Host name=&curbdiver.net&&
    &Context path=&& reloadable=&true& docBase=&/home/curbdive/public_html& debug=&1&/&
    &/Host&
    &Host name=&www.curbdiver.net&&
    &Context path=&& reloadable=&true& docBase=&/home/curbdive/public_html& debug=&1&/&
    &/Host&

    Restart tomcat, restart httpd - ta da. Your parked domains now work. May be a bug in whm/cpanel when a domain is parked, it isnt added to the tomcat server.xml file. I'm going to post the info to that board also..

    Hope this helps someone down the road..
     
  3. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    This is the way it is supposed to work. Tomcat instantiates by host name. Each entry in the file utilizes additional RAM/resources. If you add entries such as below:

    abc.com
    www.abc.com
    abc.net
    www.abc.net

    ...you are actually loading four distinct 'instances' of Tomcat, just as if those were 4 different customers. I personally feel this is too much of a resource strain, so I only set up Tomcat to support the primary 'www.domain.com' entry only and tell my customers this.

    I urge them to create a variable and define the absolute URL to the servlet using the primary domain (or hardcode it on .html pages). Assuming you support the same number of distinct customers in either scenario, the latter will increase the performance of your server.

    Jaz
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Works for Sub-Domains as well

    Thanks Diatone!:)
     
  5. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    Now and then it seems that server.xml reverts back to its old state without the manual editing above (adding a parked domain entry).

    Does anyone know why? And how to solve this?
     
  6. uh2

    uh2 Member

    Joined:
    Jan 22, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    edit server.xml.in just before the where the marker for the dynamic host list
     
  7. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Correct, cpanel builds server.xml from server.xml.in Anything you do not wanted lost needs to be put in both files.
     
  8. FeeL

    FeeL Well-Known Member

    Joined:
    Apr 17, 2004
    Messages:
    135
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Rio de janeiro
    cPanel Access Level:
    Reseller Owner
    just fine

    I saw this problem, but was not sure where to solve it...

    thank you!

    Can this be a "minor whm / cpanel bug"?

    I think the Cpanel staff should think on a way to solve it!

    This is not so hard to do...
     
  9. appservermgr

    appservermgr Member

    Joined:
    Feb 16, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Actually using the Alias tag allows you to have multiple domains mapped to the
    same instance of the java application like so:

    <Host name="mydomain.com" appBase="/home/cpaneluser/appservers/apache-tomcat-5.5x/webapps"
    unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
    <Alias>www.mydomain.com</Alias>
    <Alias>members.mydomain.com</Alias>
    <Context path="" docBase="/home/cpaneluser/appservers/apache-tomcat-5.5x/webapps/myapp">
    </Context>
    </Host>

    <!--
    Tags below used as a reference to illustrate the location to insert the
    above entry.
    -->
    </Engine>
    </Service>
    </Server>
     
Loading...

Share This Page