LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tomcat VirtualHost Setup Issue.. (https://www.linuxquestions.org/questions/linux-newbie-8/tomcat-virtualhost-setup-issue-771127/)

your_shadow03 11-23-2009 10:14 PM

Tomcat VirtualHost Setup Issue..
 
Hello Al,

I have recently installed Tomcat on my new CentOS 5.2.
Code:

[root@on3 ~]# echo $JAVA_HOME
/opt/jdk1.6.0_17
[root@on3 ~]# echo $CATALINA_HOME
/opt/apache-tomcat-6.0.18
[root@travelodgemon3 ~]#

Now I am in verse of setting up VirtualHost on Tomcat. I followed this link:http://www.ex-parrot.com/pete/tomcat-vhost.html almost every step.
I have server.xml entry for new VirtualHost as:
Code:

<Engine name="Catalina" defaultHost="start.com" />
      <Host name="start.com" debug="0" appBase="webapps/start.com"
      unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">

        <Logger className="org.apache.catalina.logger.FileLogger"
      directory="logs"  prefix="$host\_log." suffix=".txt" timestamp="true"/>

    <Alias>start.com</Alias>
    </Host>

Earlier there was only on eentry:
Code:


<Host name="localhost"  appBase="webapps/localhost"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

May I know what I need to type on Web URl to see if its configured properly.

bathory 11-24-2009 02:20 AM

Hi,

If tomcat is configured to listen on port the default port 8080, then the URL should be: http://start.com:8080

Regards

your_shadow03 11-24-2009 02:23 AM

Yep...I had checked that and its working fine with the URL.

I have start.com webpage( thru VirtualHost In Tomcat) running now. I can easily browse through http://start.com:8080/. All I need is creating http://en.start.com:8080 which opens up different application.

Can alias come up into this picture?
How can I achieve the same?

bathory 11-24-2009 02:46 AM

Alias is not going to work, as all it does is to give server a different name (thus using the same webapp)
You have to create another vhost en.start.com using a different context for the webapp that runs on that vhost.
See this for details

Regards


All times are GMT -5. The time now is 11:36 PM.