mohitkira

Registered
Dec 26, 2016
2
0
1
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 [email protected]
    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
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
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.