Configure virtual directory on Tomcat

In these days, I've removed Adobe Coldfusion9 Developer version from my laptop and tried to install Railo 3.2 for testing about ORM feature of it. That's why I've installed the integrated installer of Railo. Before installation Railo, I feel I should remove existing apache from my laptop because I won't want any conflict will be come out because of Railo. Regarding Railo integrated installer documentation, it used Apache + Tomcat + Railo in it. That's why I feel I'm correct what I did.

After a few minutes, Railo is completely installed in my laptop. After that, I need to migrate my existing projects into Railo by configuration on Tomcat. That's why I need to create virtual directory on Tomcat. Well, I've posted create virtual directory in Apache and I feel create virtual directory on Tomcat will be same as what I've posted about.

Here is simple way to create virtual directory on Tomcat.

  • 1) [tomcat_install]/tomcat/conf/Catalina/localhost/
  • 2) create XML file. File name is the name of the virtual directory's name. If you created XML file name as posCFC.xml, your virtual directory will be "http://localhost/posCFC/"
  • 3) add the following coding into this XML file.
    view plain print about
    1<Context path="/POS" docBase="E:/Project/POS" debug="0" privileged="true">
    2</Context>
  • 4) Restart your Tomcat. (it's optional.)

Configure subdomain in Apache

Yesterday @christopher commented "how to configure subdomain in Apache" under the post "Install Apache and Create Virtual Directory in Window 7". To be honest, I'm now currently developing CF development on Window 7 that's why I know how to configure subdomain in Window 7, not on Linux or other OS. To configure in subdomain, we need to do in 2 parts.

  • To configure in hosts file of window
  • To configure in Apache httpd.conf

1) To configure in hosts file of window

First of all, we need to find hosts under the following location. C:\Windows\System32\drivers\etc (it's for window7, if you're using another window version, search under System32 folder.) Then, open hosts with notepad and you will see the following codings.

Here is the below part of hosts file.

[More]

Install Apache and Create Virtual Directory in Window 7

My laptop is getting slow when I run IIS7 and CF9. Honestly, the physical memory of my laptop is just 2G and happening so because of lack of memory. That's why I need to remove IIS7 and install Apache as my web-server. Before installing Apache in window 7, I though it's difficult to install and configure because my OS is window. As we all know, the configuration setting in Apache isn't same as IIS because IIS GUI is quite nice for developers and don't need to configure like add codings in Apache. In Apache, it's a bit messy but I can cool.

Here is the instruction guide of Installation Apache.

1) Download Apache installer

You can download installer under this link Download Apache Installer. For me, my downloaded file is httpd-2.2.17-win32-x86-no_ssl.msi.

2) Install Apache

Install Apache. When you reach the following screen (Server Information)

Server Information

[More]

Top of Page