Apache Tomcat serving multiple webapps on different domains

apache tomcat java multipe webapps
Standard

How to serve multiple web applications on different domains through Apache Tomcat

This is a guide to setting up multiple webapps on Apache Tomcat, locally or VMWare or Amazon EC2 instance. We also talk a little about iptables and port redirection towards the end.

Requirements

  • java 1.7 (assumed installed)
  • centos 6.5 (assumed installed)
  • apache tomcat (assumed installed)

To see how to install Oracle Java Development Kit 7.0 installation, Apache Tomcat installation or Open JDK installation for Amazon EC2 Instance please check one of the previous posts.

Continue reading

Hiberfil.sys on Windows

Standard

Hibernation on windows 7

So there was a really big fat hiberfil.sys file on one of my Windows 7 Virtual machines taking up a lot of space (approximately 20GB). This file is used by Windows to manage the hibernation mode as one of it’s power management modes. Windows uses this file to store the current memory state of your computer. Since it’s used by Windows you can’t just delete it. All that space when I don’t even use the ‘Hibernation’ mode.

So if you are not going to use the Hibernation mode like me you can disable it by opening the command prompt in the Administrator mode running the following command

This will disable the ‘hibernation’ mode and you will see the ‘hiberfil.sys’ file disappear freeing up a LOT OF SPACE. Awesome. More space but no more hibernation. Who needs hibernation anyway? Get to work!

Changing MAC address and HOSTNAME on VMWare

mix it up
Standard

How to change MAC address and HOSTNAME on Centos 6.5 VMWare virtual machine

I use VMWare quite a lot and every now and then have to clone from a clean virtual machine image. When doing so you could end up with a mac address conflict especially if you have some firewall rules and policies attached to the mac address. The simplest way to change this is via the virtual machine settings in VMWare workstation. This is being done using VMWare Workstation and CentOS server 6.5.

Continue reading

Change default user folder location in Windows 7

Standard

How to change the default user folder location in Windows 7?

Just quick post to change the default user folder location in Windows 7. This might be a good idea if you want to reinstall Windows, you can have your user data available after install. It would also be a good practice to have it on a different partition or a different drive altogether.

This requires some changes in the Windows registry, so if you don’t know what you are doing then please don’t move ahead with the following instructions. Always good to have a back of the registry as well.

The registry key that you want to play around with is as follows

For existing user you can look for another all the folders under the above key starting with ‘S-1-5-21’ followed by array of long numbers separated by a ‘hyphen’. Select the folder and in the right pane change the 'ProfileImagePath' to whichever path you want to point the User data to.

For changing the path for any new users that are to be created, you need to change the [viminline=”true”]’ProfilesDirectory'[/vim] from [viminline=”true”]’%SystemDrive%\Users'[/vim] to something of your liking.

Reboot and you are done. Only make the above changes at your own risk.