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.

Setting Java Web Application contexts properly on cPanel

Discussion in 'General Discussion' started by EagleEye007, Feb 16, 2015.

  1. EagleEye007

    EagleEye007 Registered

    Joined:
    Feb 16, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi cPanel Guru's,

    I am new to this world of cPanel and Web Hosting.

    I have a web application developed in Java. I uploaded it to /home/<myAccount>/public_html/ and the path looks like /home/myAccount/public_html/MyJavaWebApp

    The application is deployed on Apache Tomcat 7.0

    I am able to access this deployed application using url /http://myaccount.com/MyJavaWebApp

    However, I want to access it using url /http://myaccount.com

    For this, I made below changes to /usr/local/easy/share/easy-tomcat7/conf/server.xml

    <Host name="myaccount.com" appBase="/home/myaccount/public_html/MyJavaWebApp" unpackWARs="false" deployXML="false">
    <Alias>www.myaccount.com</Alias>
    <Context path="" reloadable="true" docBase="/home/myaccount/public_html/MyJavaWebApp" debug="1"/>
    <Context path="/manager" debug="0" privileged="true"
    docBase="/usr/local/easy/share/easy-tomcat7/webapps/manager">
    </Context>
    </Host>

    Now, I am able to hit my site using url /http://myaccount.com with a major problem that I don't see any images there and some images sliders not working (I used jQuery skitter API for this) etc..

    Very important thing to note is that I am able to access the site using url /http://myacccount.com/MyJavaWebApp without any issues (All images appear and all sliders and jQuery APIs work fine)

    Can someone please let me know if I am missing something in my configuration?

    Any suggestions are appreciated.

    Thanks in advance!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. EagleEye007

    EagleEye007 Registered

    Joined:
    Feb 16, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    Thanks for your response! I was able to resolve the issue. I was not aware of looking at /urs/local/apache/logs/error_log for tracing the issue.

    Rather, I used Fiddler (A web debugging proxy) to look at what is the image URL under question and the context. I did set those things properly on my Java Web Application so that it can be deployed on any hosting env.

    Thanks again for your response Michael. I appreciate the help :)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page