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.

Send http request to tomcat server

Discussion in 'Workarounds and Optimization' started by mohitkira, Dec 31, 2016.

Tags:
  1. mohitkira

    mohitkira Registered

    Joined:
    Dec 26, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California
    cPanel Access Level:
    Root Administrator
    Hi

    I am new with cpanel. I recently bought a new VPS hosting. I have 2 domains which are using the same VPS hosting. I want to send one domain request apache server and send other domain request to tomcat. By default 80 port is used by apache server and 8080 is used by tomcat server. So far I came to know that I need to edit the httpd.config file. I added this code in post_virtualhost_global.config
    Code:
    
    <VirtualHost IP:80>
        ServerName xyz.com
        ServerAlias mail.xyz.com www.xyz.com
        DocumentRoot /home/xyz/public_html
        ServerAdmin webmaster@xyz.com
        UseCanonicalName Off
    
        ## User xyz # Needed for Cpanel::ApacheConf
        UserDir enabled
        <IfModule mod_suphp.c>
            suPHP_UserGroup xyz xyz
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup xyz xyz
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid xyz xyz
        </IfModule>
        <IfModule itk.c>
            # For more information on MPM ITK, please read:
            #   apache2-mpm-itk
            AssignUserID xyz xyz
        </IfModule>
      
        ProxyRequests Off
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
    
        ProxyPass / http://www.xyz.com:8080/
        ProxyPassReverse / http://www.xyz.com:8080/
        <Location />
            Order allow,deny
            Allow from all
        </Location>
    
        ScriptAlias /cgi-bin/ /home/xyz/public_html/cgi-bin/
    
    
    
    
        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2_2/xyz/xyz.com/*.conf"
    </VirtualHost>
    
    username and domain name is xyz.

    Its not working. Could you help me with it.

    Thanks
     
    #1 mohitkira, Dec 31, 2016
    Last edited by a moderator: Jan 1, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. mohitkira

    mohitkira Registered

    Joined:
    Dec 26, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California
    cPanel Access Level:
    Root Administrator
    Hi @cPanelMichael,

    Sorry for late reply. I installed tomcat using yum command.

    The stackoverflow article you suggested is only showing in windows environment could you please help with so same in linux

    Thanks,
    Mohit
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Tomcat is not currently supported. You may want to consult with a system administrator to see if custom work could be completed to get the behavior you are seeking properly configured. You can find a list of system admin services on the following URL:

    System Administration Services | cPanel Forums

    I also encourage you to vote for the following feature request:

    Tomcat Support in EasyApache 4

    Thank you.
     
Loading...

Share This Page