How to make your VM think it is www.hollandamerica.com

From: Mario Hartman [mailto:mhartman@hexacta.com]
Sent: Tuesday, May 29, 2012 10:44 AM
To: Ruckman, Maurice (HAL); Augustine, Anila (HAL); Mirza, Masood (HAL Contractor); Fillman, Eric (HAL)
Cc: Sankar, Kousalya (HAL); Brace, Jannette (HAL Contractor); Florencia Castro; Thompson, Sonya (HAL); Daniela Greca
Subject: RE: Sample JSP with IFrame to Bazaar Voice on the network server

Hi,
These are the changes I made to trick my server into thinking that we are under the domain www.hollandamerica.com

1 - Go to /etc/httpd/conf/httpd.conf file and change your virtual host in this way

### Section 3: Virtual Hosts
NameVirtualHost www.hollandamerica.com:80
<VirtualHost www.hollandamerica.com:80>
DocumentRoot "/home/jboss1/HAL/halwebsite"
ServerName www.hollandamerica.com:80
ErrorLog logs/error.log
JkMountFile conf/uriworkermap.properties
SSLEngine off
</VirtualHost>

NameVirtualHost www.hollandamerica.com:443
<VirtualHost www.hollandamerica.com:443>
DocumentRoot "/home/jboss1/HAL/halwebsite"
ServerName www.hollandamerica.com:443
ErrorLog logs/ssl_error.log
JkMountFile conf/uriworkermap.properties
#CustomLog logs/ssl_access.logcombined
SSLEngine on
SSLCertificateFile "/etc/httpd/conf/ssl/hq.halw.com.crt"
SSLCertificateKeyFile "/etc/httpd/conf/ssl/hollandamerica.com.key"
</VirtualHost>

Also in this file change your server name to: ServerName www.hollandamerica.com.com:80

2 - Change the following line in your hosts file (/etc/hosts) to looks like the following line
127.0.0.1             www.hollandamerica.com localhost

3 - Change your /etc/sysconfig/network file  and set the hostname as:
HOSTNAME=www.hollandamerica.com

After that, restart your network service, restart your apache instance and your jboss server.

If everything  went well, you will be able to access your local server using www.hollandamerica.com in your webbrowser.
If anyone think that we can reach the same goal with less changes or with a better configuration please let me know.

Thanks

Mario

Mario Andres Hartman
Phone 54+343+423 6141
San Martín 902, E3100AAT, Paraná, Argentina
Think Green - Please do not print this email unless you really need to

Looking at some JBOSS properties in jmx-console

Here's how to look at some JBOSS properties in the jmx-console

Note: You can change the current state of your server, but only during run time, configuration files are not updated. So, it's a nice way to look via a GUI and play a bit too.

http://haldevjbs##.hq.halw.com:8080/jmx-console/
where ## is your machine number

credentials:
admin/admin

Put jboss*:* in ObjectFilter name in upper right corner

Click on the link (search for):
name=SystemProperties,type=Service

Click on the "Invoke" button for showAll

You'll see all of the system properties

Another one to try (go back, and search)
Click on the link:
service=JNDIView

Click on the "Invoke" button for list

Another one to try:

Put jboss.system*:* in ObjectFilter name in upper right corner

Click on the link:
type=server

You'll see information about your server