Hosting Multiple Domains In Tomcat

fonte: http://iam-rakesh.blogspot.it/2009/10/hosting-multiple-domains-in-tomcat.html

Hosting Multiple Domains In Tomcat

Tomcat allows us to host multiple domains in one instance, using multiple ‘Host‘ tags. In this article I will explain how to do it on Tomcat. This is very simple configuration using ‘Host‘ tags in your server.xml. A novice can also understand this configuration very easily.
Before going into the details of the configuration first lets have a look at the ‘Host‘ tag, ‘Context‘ tag and ‘Alias‘ tags first.

   <Host name="domain1" appBase="[application base]" autoDeploy="[true/false]" 
        unpackWARs="[true/false]">
    <Alias>...</Alias>
    <Context path="" docBase="" reloadable="[true/false]"/>
   </Host>
First lets have a look at ‘Alias‘ tag. This tag is used to provide aliases for your actual domain. For example you have a domain called ‘domain1.com’, and you want to run the same application for ‘www.domain1.com’ also, then you can use this ‘Alias’ tag to provide an alias name for the actual domain.

   <Host name="domain1.com" ...>
    <Alias>www.domain1.com</Alias>
    <Alias>domain1.net</Alias>
    <Alias>www.domain1.net</Alias>
    ...
   </Host>

As you can see in the above example, if you want to have multiple aliases you can add multiple ‘Alias’ tags for each domain alias name.
Now lets move on to the ‘Context‘ tag. The ‘Context’ element represents a web application running inside a host. To explain this in an easy way; each directory under ‘webapps’ directory of your tomcat is one context. Manager and Admin consoles of your tomcat installation are two different contexts running under your ‘localhost’ domain.

   <Context path="" docBase="" reloadable="[true/false]"/>

In the above code snippet I’ve provided minimum configuration needed for a context. Lets go through the attributes of ‘Context’ tag.
path‘ attribute – here we need to give the relative URL [to the host URL in which this Context is being configured] of the context. Say you want to run the application from “domain.com/beta” then the ‘path’ attribute needs to be “/beta”.
docBase‘ – the Document Base directory. Here we need to give the root directory for this context. This can be an absolute path to the directory/WAR file OR relative to the ‘appBase’ given in the ‘Host’ tag. If the context root directory is inside the ‘appBase’ directory of the ‘Host’ tag then we can give it as

   docBase="."

reloadable‘, it defaults to ‘false’. If you give ‘true’ to this value, tomcat looks for changes in the ‘WEB-INF/classes’ or ‘WEB-INF/lib’ directory and reloads the context automatically. This will useful in development environment, so that a new deployment doesn’t result restarting tomcat. But on production server its better to leave the default value as setting it to true results an overhead on the server.
Now the ‘Host‘ tag – it represents a host [also called as Virtual Host] running, associated with a domain name in the server. We can have multiple ‘Host’ tags to host multiple domains in one tomcat. Lets see the attributes.

   <Host name="domain1" appBase="[application base]" autoDeploy="[true/false]" 
        unpackWARs="[true/false]">
   ...
   <Host/>

name‘ – Domain Name attribute. Here we need to give the domain name which you are trying to host/deploy.
appBase‘ – Application Base Directory attribute. Here we need to give the root directory for this application which contains web applications to be deployed on this host. It can be either an absolute path to the directory OR relative to the ‘CATALINA_BASE’ directory.
autoDeploy‘ – flag to denote newly placed web applications should be deployed automatically. If this attribute is set to true and you place a WAR file OR a Web application directory in ‘appBase’ then tomcat automatically deploys the application.
unpackWARs‘ – if set to true Tomcat will automatically unpack the WAR files placed in to corresponding directory structure.
Now lets look at the configuration to host multiple domains.

   <Engine defaultHost="domain1.com" name="Catalina">
    <Host name="domain1.com" appBase="/home/user1/domain1">
     <Alias>www.domain1.com</Alias>
     <Context path="" docBase="."/>
    </Host>
    <Host name="domain2.com" appBase="/home/user1/domain2">
     <Alias>www.domain2.com</Alias>
     <Context path="" docBase="."/>
    </Host>
    <Host name="domain3.com" appBase="/home/user1/domain3">
     <Alias>www.domain2.com</Alias>
     <Context path="" docBase="."/>
    </Host>
   </Engine>

In the above configuration we tried to host three domains in Tomcat. We added three ‘Host’ tags one for each domain we wanted to host. Each domain points to a different [‘appBase’] directory [I used absolute paths for ‘appBase’ attribute, it can be relative to CATALINA_BASE].
That’s it for now!

Exchange 2010 SP3 Update Rollup 1 Installation tips

fonte: http://oxfordsbsguy.com/2013/06/13/exchange-2010-sp3-update-rollup-1-installation-tips/

Microsoft Exchange 2010 SP3 Update Rollup 1 Installtion tips

On May 29th Microsoft released the Exchange 2010 SP3 Update Rollup 1. See the official post here.

I’ve installed this on my test SBS 2011 server and compared to some previous update rollups it is remarkably quick to install, just under 12 minutes from start to finish, and my test SBS server isn’t very powerful.

You may also want to consider waiting a couple of days before deploying the update rollup in your production environment as the previous update rollups have had the original version pulled, before a v2 was released. Hopefully Microsoft have got this one right first time.

While looking for others experience of installing the update rollup I’ve come across a few suggestions that might help speed the install up and a few best practice tips. This has been updated from my previous tips on installing Update Rollup 6 for 2010 SP2, found here.

1. Reboot the server prior to installing the update rollup. If it has been up for a while a reboot will make sure it is in a know good state.

2. Run the update from an elevated command prompt.

3. In Internet Explorer, deselect “Check for Publisher’s certificate” and “Check for server certificate revocation”, from Internet Options, Advanced tab, Security options.

4. Disable antivirus software.

5. Have a full backup and a system state backup of the server.

6. Make sure the SBS console is closed if installing the update on SBS 2011.

While the update is installed it will automatically stop Exchange and IIS services, and restart them again once complete.

Once the update has finished, remember to undo the changes made in steps 3 and 4 above.

How to install Exchange 2010 SP3 on SBS 2011

fonte: http://oxfordsbsguy.com/2013/02/13/how-to-install-exchange-2010-sp3-on-sbs-2011/

Exchange 2010 SP3 was released yesterday, here is a very quick walk through of the installation process in case you don’t have a test environment to hand.

The whole SP3 installation tool under 30 minutes from start to finish on a vm workstation based SBS 2011 server with 8GB of Ram and a single vCPU. Granted my Exchange database size is small at only a few 100MB, but looking at the release notes unless you are upgrading from the RTM version is shouldn’t take much longer.

Edit: Review the notes on how to install Service Packs and Update Rollups for Exchange here: Exchange 2010 SP3 Update Rollup 1 Installation tips.

1. Download the Service pack from here.

Exchange 2010 SP3 Download1a. Close the SBS Console.

2. Run the Exchange2010-SP3-x64.exe and extract the files.

2a. Stop any Backup Exec services if you have it running locally.

3. Browse to the location where the files are and run setup.exe

4. Click the Install Microsoft Server Upgrade link.

Exchange 2010 SP3 install start

5. Accept the license agreement and click next.

Exchange 2010 SP3 install - license

6. Wait for the Readiness Checks to complete.

Exchange 2010 SP3 install - readiness check

7. Click Upgrade.

Exchange 2010 SP3 install - upgrade

8. Once complete, check the setup log, and click Finish.

Exchange 2010 SP3 install complete

9. Finally check the version of Exchange is correct, and email services are working correctly.

Exchange 2010 SP3 Version

Exchange 2010 SP3 Update Rollup 1 Installation tips | Oxford SBS Guy

Exchange 2010 SP3 Update Rollup 1 Installation tips | Oxford SBS Guy.

Microsoft Exchange 2010 SP3 Update Rollup 1 Installtion tips

On May 29th Microsoft released the Exchange 2010 SP3 Update Rollup 1. See the official post here.

I’ve installed this on my test SBS 2011 server and compared to some previous update rollups it is remarkably quick to install, just under 12 minutes from start to finish, and my test SBS server isn’t very powerful.

You may also want to consider waiting a couple of days before deploying the update rollup in your production environment as the previous update rollups have had the original version pulled, before a v2 was released. Hopefully Microsoft have got this one right first time.

While looking for others experience of installing the update rollup I’ve come across a few suggestions that might help speed the install up and a few best practice tips. This has been updated from my previous tips on installing Update Rollup 6 for 2010 SP2, found here.

1. Reboot the server prior to installing the update rollup. If it has been up for a while a reboot will make sure it is in a know good state.

2. Run the update from an elevated command prompt.

3. In Internet Explorer, deselect “Check for Publisher’s certificate” and “Check for server certificate revocation”, from Internet Options, Advanced tab, Security options.

4. Disable antivirus software.

5. Have a full backup and a system state backup of the server.

6. Make sure the SBS console is closed if installing the update on SBS 2011.

While the update is installed it will automatically stop Exchange and IIS services, and restart them again once complete.

Once the update has finished, remember to undo the changes made in steps 3 and 4 above.

No remote Desktop Licence Server availible on RD Session Host server 2012

fonte: http://www.360ict.nl/blog/no-remote-desktop-licence-server-availible-on-rd-session-host-server-2012/

Posted on by Eric Verdurmen

A fully functional and activated 2012 Remote Desktop Session Host server displayed the following message:

error no licence

This was a simple setup on one server with the: connection broker, Session Host and Licensing server with 2012 CAL’s installed.

Even though the licensing seems to be configured correctly, in server manager:

ServerManagerLicencingOK

and powershell:

Powershell_setting

Licensing diagnostics:

Licdiag

everywhere you look, everything seems to be OK. But the license manager shows something odd:

NoLicensesUsed

No licenses are being used? This server was used since late 2012. Some interesting things could also be found in the event logs, the following events appear:

EventID: 1130
Source: TerminalServices-RemoteConnectionManager

The Remote Desktop Session Host server does not have a Remote Desktop license server specified. To specify a license server for the Remote Desktop Session Host server, use the Remote Desktop Session Host Configuration tool.

event1130

and:

EventID: 1128
Source: TerminalServices-RemoteConnectionManager

The RD Licensing grace period has expired and the service has not registered with a license server with installed licenses. A RD Licensing server is required for continuous operation. A Remote Desktop Session Host server can operate without a license server for 120 days after initial start up.

1128eventid

The solution was to delete the REG_BINARY in

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

Only leaving the default.

regkey

Note: you must take ownership and give admin users full control to be able to delete this key.

After a reboot the server should be working again, licenses are now being used:
Licencemanager

Although everything seemed to be ok and configured correctly with valid licenses, it seems that the setup was still in a 180 day grace period, even though it was correctly configured.
A possible bug in RDS 2012?

Windows Server OEM licensing is cheaper, but not always.

fonte: http://blogs.technet.com/b/uspartner_ts2team/archive/2013/04/30/windows-server-oem-licensing-is-cheaper-but-not-always.aspx

To be specific OEM licensing has many limitations:

 

  • Licenses are non-transferable (to another computer)
  • Licenses expires with the hardware
  • A change of motherboard or processor will deem an OEM license invalid and a new license will have to be purchased as it is similar to changing to a new system
  • There is No upgrade path
  • You will need to keep the COA (certificate of authenticity) and invoice (OEM license is purchased with hardware) as proof of license
  • No on-line tracking
  • No re-imaging rights.  You cannot create custom images and deploy using third Microsoft or third party tools
  • If a license is lost, damaged in fire/flood or stolen, new licenses needs to be purchased as there is no way of replacing those licenses as Microsoft does not keep track of the licenses.
  • Each install has different license key and will need to be activated online. You cannot use a Volume license key to install OEM licenses
  • No multiple language rights
  • Support is the responsibility of the OEM reseller (probably you), not Microsoft.

UEFI-aware operating system does not boot after load defaults or deployment – IBM BladeCenter and System x

fonte: http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=migr-5079636

Symptom

Loading the defaults in Unified Extensible Firmware Interface (UEFI) deletes the Boot Order entries for any UEFI aware operating system.

These entries are required to boot the operating system correctly.

Deployment images may also use this information to automatically boot an Extensible Firmware Interface (EFI) operating system for the first time.

Workaround

The workaround is dependent upon the particular UEFI operating system. Refer to the UEFI operating system information for the actual file name and path used to boot that particular operating system.

For example, for Microsoft Windows Server 2008, the steps are as follows:

  1. Power on the system, and, when prompted, press F1 to enter setup.
  2. Select Boot Manager.
  3. Select Boot from File.
  4. Select the GUID Partition Tables (GPT) System Partition where you installed Microsoft Windows Server 2008.
  5. Select EFI.
  6. Select Microsoft.
  7. Select Boot.
  8. Select bootmgfw.EFI.

Additional information

This is working as designed.

Operating system vendors are aware of the symptom. When you boot your UEFI operating system using “use the Boot from File method,” the operating system may recreate the UEFI Boot Order Entry if it has been deleted.

By copying the UEFI operating system boot manager to the GPT System Partition directory\EFI\BOOT with the name BOOTX64.EFI, this will allow the EFI operating system to boot automatically.

The boot manager for Microsoft Windows Server 2008 is as follows:

\EFI\Microsoft\Boot\Bootmgfw.EFI

Copying the UEFI operating system boot manager when building the master disk image that will be cloned for deployment will allow the EFI operating system to boot the first time the system is started.

How to Setup SQL Server 2008/2008R2 Maintenance Plan and Email Notifications

fonte: http://nideesh.wordpress.com/2012/10/24/how-to-setup-sql-server-20082008r2-maintenance-plan-and-email-notifications/

How to Setup SQL Server 2008/2008R2 Maintenance Plan and Email Notifications

Most of the time we will have good installation and configuration for several systems but when we talk about maintenance and regular health check there should be a delay in talk and response. Database backup and maintenance should consider very important DBA should take responsibility to their assigned database. This article, we will discuss about creating Email notification and alert using out of box notification solutions designed by Microsoft in SQL 2008 /2008R2, we will go deep in maintenance plan and notification task. Backing up database in to tape or disk is not the scope of this articles however to explain SQL Database mail and Email notification ,we will back up the database in to disk and when the backup task is completed we will trigger the notification to the respective admin user for the status of the process. This will become a warning for the admin in case there is a failure in backup or any other task which we have scheduled through maintenance plan with in SQL. Then whole process and step described in this article are done through Microsoft SQL Server Management Studio, of course for email creation you have to go for the mail server.

First step is to configure Database Mail. Open Microsoft SQL Server Management Studio then right-click on Database Mail > select Configure Database Mail

clip_image001

Skip the welcome screen and select Next on the Select Configuration Task window.

clip_image003

Create new profile > fill out Profile name > Select Add under SMTP accounts:

clip_image005

Fill out New Database Mail Account info:

clip_image007

You can create New profile for SMTP Server and Email Address for different jobs and maintenance Plan here by adding more SMTP profile

clip_image009

clip_image011

Consider public and privet profile security, Default Profile and email flow according to your environment and alert requirements. Flowing are the screens for the completion and over view of your Database mail configuration which you have carried out.

clip_image013

clip_image015

clip_image017

After all went right Send test email by Right-click on Database Mail

clip_image019

Fill out test info, by typing the email address and select Send Test Email.

clip_image020

clip_image021

clip_image022

clip_image023

Check your inbox for the test mail .If you do not receive the test mail ,then make sure all the email address and SMTP setting you have configured on the SQL Database Mail configuration and Exchange server incase if your relaying your mail form SQL server.

clip_image025

Also for troubleshooting mail flow, View Database Mail log is a good place for starting.

In order to receive Email we must create at least one operator it will be under SQL Server Agent and right click Operators and click for New Operator

clip_image026

Here you can specify the Name of the Operator then in Notification options, we can set up email, Net send etc…and also the schedule, and these are self-explanatory. After fill all the necessary info and details click OK.

clip_image027

clip_image028

Now we will create a Maintenance Plan, right click on Maintenance Plans àMaintenance Plan Wizard. If you have already one just Modify that plan and add the notify operator task or success and failure.

clip_image030

clip_image032

clip_image034

Write the name and description and schedule it by click the change button.

clip_image036

I have schedule this for daily @12AM with No end date then as soon an you click OK, you will be prompted back to the Select Plan Properties; click Next. You will get help on this and any configuration part by clicking Help button if you have installed the documents and Books while installing SQL Server. This is good practice and you will get a quick reference point.

clip_image037

Here you can select the Maintenance Task for your Maintenance Plan, which is totally based on your requirements Click Next

clip_image039

Move the order if you required then select task and click Next. The few screens below are the backup settings. This is again your choice and requirement.

clip_image041.

clip_image043

clip_image045

clip_image047

Here you can select the report location folder and Email that report to the DB admin or operator you have created earlier in the post. Click Next

clip_image049

This will finish the Maintenance Plan Wizard. Click the + sign and review the settings you have made in this plan.

clip_image050

I fall wend right you will be in Green window and close the Wizard.

clip_image052

Right click on the Maintenance Plan and click Modify this will open the Maintenance Plan Design windows

clip_image054

From the toolbox on your right side drag and drop the Notify Operator Task to any Maintenance Plan you want to notify email alert whether it is success or failure.

clip_image056

Below is the screen for my Maintenance Plan notification design.

clip_image057

Here the red is connector is Failure and Green is Success. You can right click on the connector and change the status to success or failure at any time and also you can edit. Below is the screen for Task connector status.

clip_image058

Now double click on each Notify Operator task and Select the Database Mail which you have created earlier and Type subject and message body according to your need.

clip_image059

Finally, you can test your Maintenance plan and Email notification, If you want to wait for the seclude to be run then fine , otherwise by right click on the Maintenance Plan you have created and click Execute. You will be having a status window like the one shown below close it after finish.

clip_image060

clip_image062

clip_image064

If every this is configured right or not but the Database Mail configuration and Operator email is configured properly you will get notification. There will always be some adjustment and special configuration is required depends upon the environment, that you can sort out with your skill and experience. I have created distribution mail group and add as many administrator you want notify by simply add the user in that AD distribution mail group, this way you can eliminate the errors caused when you fiddle around with SQL management studio and other settings.

This article will help you a better understating for your setup and configuration. Suggestion and questions are very important for me to improve and enhance next article. I always believe in praising of my mistakes.

How to restore Windows 2012 2008 Server from a VHD file

fonte: http://www.youtube.com/watch?v=uZF8u5PiVfs

  • Find out the VHD location that contains backup
  • Choose repair computer (F8) or boot from CdRom
  • From Command Prompt type: DiskPart and enter
  • type: select vdisk file=”location file
  • exemple:                                                                                                                 select vdisk file=”\\192.168.0.33\Backup\DataContainer.vhd”   or  select vdisk file=”c:\USBDevice\DataContainer.vhd
  • type: attach vdisk
  • type: exit to exit Diskpart, type exit to exit Command Prompt
  • Choose Trubleshoot. Choose system image recovery…..