×
×

Base De Connaissances & Téléchargements

La base de connaissance comprend la documentation écrite par notre équipe. Choisissez la catégorie où chercher les réponses

Articles

How to map a domain to Tomcat's web application?

For our example let's assume the domain is domain.com, the web application is app1 (app1.war) and the appserver is apache-tomcat-7.0.5
1) Update nameservers at registrar if needed and add the domain to your control panel as either addon domain or parked domain
2) Map domain.com (use default mappings) to your application server using JVM control panel (JVMCP) https://jvmcp.gemini.jvmhost.com/
3) Login to your account via SSH and edit ~/appservers/apache-tomcat-7.0.5/conf (mcedit and nano are simple editors)

cd ~/appservers/apache-tomcat-7.0.5/conf
mcedit server.xml

3a) Add new virtual host entry just before last '' tag

                                                                                
    www.domain.com                                                                                                                                  
                                                                                             
       
               prefix="localhost_access_log." suffix=".txt"                                                                                                          
               pattern="%h %l %u %t "%r" %s %b" resolveHosts="false"/>                                                                                     

3b) If you previously put app1.war into webapps directory Tomcat should have deployed the application
but make sure your application files are indeed deployed to ~/appservers/apache-tomcat-7.0.5/webapps/app1 directory.
4) Restart your tomcat via JVM control panel (JVMCP) https://jvmcp.gemini.jvmhost.com/ or with 'jr' shell command



Powered by HostBill