1

I am configuring a Virtual Host in Tomcat.I followed following mentioned steps. After Setting a Virtual Host at the end Apache Tomcate7 is not starting properly.

  • Step 1.

    I go to windows directory C:\Windows\System32\drivers\etc\hosts file for DNS Entry. I added following line to map IP with Host name.

    192.168.1.109 omtstesting.com

  • Step 2.

    I go to server.xml in apache-tomcat-7.0.42 and added new entry of host in Engine below default entry of host

Original apache server.xml file Engine (Working State)

<Engine name="Catalina" defaultHost="localhost">
  <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true"/>

 </Engine>

Changed apache server.xml file Engine (Not Working State)

<Engine name="Catalina" defaultHost="localhost">
  <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true"/>

  <Host name="omtstesting.com"  appBase="omts_webapps"
        unpackWARs="true" autoDeploy="true"/>

 </Engine>
  • Step 3.

    I go to apache-tomcat-7.0.42 and copy "webapps" folder and paste it and renamed pasted folder as "omts_webapps"

  • Step 4.

    Now, I go to apache-tomcat-7.0.42\bin directory for starting Apache Server and I clicked startup.bat. Tomcat Console opens and closed automatically.

Kindly review and give a required answer, comment or feedback if any further step, action, improvement or modification is required for starting tomcat properly.

islamuddin
  • 185
  • 5
  • 17
  • 1
    You're going to need to check the logs for errors. – Boris the Spider Oct 16 '15 at 07:45
  • Without information from the log file we will not be able to help. Calling startup.bat from a command line might help already because the window will not close automatically and take any error messages with it – Marged Oct 16 '15 at 07:45
  • @Marged , Where should I add log file either in default local host of webapps or into the new entry of host ? – islamuddin Oct 16 '15 at 07:52
  • 1
    "Add the log file"? What are you planning to do? I would take the advice of starting the server from a command prompt window so you can see the output it generates, probably there is a nice juicy startup exception in there – Gimby Oct 16 '15 at 07:56
  • @islamuddin: the log file is there already but you will only need to check it if you don't see anything on the console. And you should make sure that your consoles buffer is big enough so you can scroll up: http://stackoverflow.com/questions/4692673/how-to-change-screen-buffer-size-in-dos-command-prompt-from-batch-script#answer-29797651 – Marged Oct 16 '15 at 08:00
  • 1
    search for a file called catalina.out in logs folder of Apache Tomcat and post its content in the main post. – We are Borg Oct 16 '15 at 08:09

1 Answers1

0

Now Above code is working fine. I had problem in java Catalina path. I fixed it now. so that's why above mentioned code is good and working fine.

islamuddin
  • 185
  • 5
  • 17