How do I redirect my default port 80 to "mywebsite/jts"
Hello Everyone,
I apologize in advance for a probably stupid question. I have setup the lifecycle management tools and I am looking for a way to redirect the default webpage which is "https:\\myserver.domain.com" to https://myserver.domain.com/jts . I am running RTC 4.0 with websphere 8. I think the answer is to install "IBM HTTP Server" and setup a rewrite rule.
I havn't done anything like this before and am looking for some kind of documentation on this.
I have changed the default port to 443 so I can use a DoD cert, but unless the user types in the /jts they will not get to the website. Hope this made sense.
Thanks
Accepted answer
I have following rewrite rule in httpd.conf to redirect port 80 to port 443. The handling of the context to the correct WAS profile is then done in the plugin-cfg.xml
#gus begin
LoadModule rewrite_module modules/mod_rewrite.so
# redirection of plain text URL on Port 80 to SSL URL on port 443
<VirtualHost *:80>
ServerName clmserver01.company.com
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://clmserver01.company.com$1 [R]
RewriteLogLevel 1
RewriteLog "C:/IBM/HTTPServer/logs/rewrite_80.log"
</VirtualHost>
#
#gus end
Comments
This thing is not letting me post right. I just typed two paragraphs and it told me invalid request and all my stuff was gone. Also when I type in a "search" it takes me to a white page with "search" in the top left corner for me to type in what I searched for already. Also when the results come up and I click on next page, it takes me to the same page. ???????
Ok. Lets try this again. Gus, I have the exact rewrite condition in my httpd.conf file and it works great! problem is all that is saying is everything coming in on port 80, redirect it to https://servername.fqdn.com/jts. Works great BUT, port 80 is not my problem. Users cannot browse our systems using port 80 anyway. My problem is nothing is listening on the default https://myservername.fqdn.com. I need some way to redirect that to https://myservername.fqdn.com/jts. A default document or something. When JTS is setup it wants to use the default SSL port as 9443. Good luck asking Netops to open that port up on the firewall. So I changed it to 443. so now instead of typing https://myservername.fqdn:9443/jts you can go to https://myservername.fqdn/jts. All I need is a way for https://myservernam.fqdn to redirect to /jts.
4 other answers
Ok. I undestood.
For this I have a index,html on my web root. defined in httpd.conf
httpd.conf changes:
#gus change
#DocumentRoot "C:/IBM/HTTPServer/htdocs"
DocumentRoot "E:/BT-CLMweb/htdocs"
#gus end#gus change
#<Directory "C:/IBM/HTTPServer/htdocs">
<Directory "E:/BT-CLMweb/htdocs">
#gus end
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="10; URL=/ccm/web">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
<title>Rational Web Platform</title>
</head>
<!-- Background white, links blue (unvisited), navy (visited), red
(active) -->
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#000080" alink="#FF0000"><hr width="50%" size="8" />
<h2 align="center">CLMWeb Platform</h2><p>If you see this page, it means that CLMWeb Platform was installed and is running on this system.</p>
Please click <a href="/ccm/web">here</a> to immediately logon to Jazz or wait 10 seconds until you are redirected automatically to the logon screen.</body>
</html>
You can change /ccm/web to /jts and the timer in "refresh" to a shorter time.
Comments
How can I post HTML code, so it is not rendered with this editor?
Hey Gus. With your help I got the 443 setup inside the httpd.conf file. The only problem is it required me to change the WC defaulthost secure port in websphere back to 9443. By doing this all traffic is redirected to 9443. Unfortunately, our firewall will not accept traffic from 9443. It has to be 443. Is there a way I can setup a default document inside of Websphere like that index.html? or even better have a Dod banner?
Does this mean you have a firewall between the WEBserver and WAS?
I do not understand your configuration.
If I have a firewall between the WEBserver and WAS, then I'm using two WEBservers. One behind the firewall which is doing the redirection to port 9443.
[ IHS:443 -> IHS-Plugin ] -> [ FW ] -> [ IHS:443 -> IHS-PLUGIN -> WAS:9443 ]
No. The server is setup with Jazz and websphere and http on the same server. Anywhere on the internal network you can use port 9443 no problem. Our internal firewall doesn't have that restriction. So the redirect works great if you accept the default port jazz wants you to use which is 9443. Unfortunately redirecting to port 9443 will not let OUTSIDE users access the site. The only way they can access it is on 443.
Outside users are connecting to the Webserver IHS on standardport 443 on the Jazz alias. The redirection to WAS on the hostname on port 9443 is done by the IHS plugin. This IHS plugin is installed from the WAS supplemental disk.
In httpd.conf you will get a directive to load this plugin:
LoadModule was_ap22_module "C:\IBM\WebSphere\Plugins\\bin\32bits\mod_was_ap22_http.dll"
WebSpherePluginConfig "C:\IBM\WebSphere\Plugins\\config\webserver1\plugin-cfg.xml"
Example:
Your stable URI is https://clmserver01.mycompany.com
Users are using: https://clmserver01.mycompany.com/jts
IHS is redirecting the call to https://hostname.mydomain.net:9443/jts
Thanks Gus. Looks like there are 4 supplimental disks to download each over 800mb. I'll post some results tomorrow. Thanks for all the help!
Comments
What is the current situation?
WAS installed?
Jazz installed?
You have already data in Jazz or do you start setting up? What is your current stable-URI? If you have already data and the stable URI use 9443, then you need to do a server rename. For this I would get an IBM support guy onsite.
When you have a look into Installation Manager/Installed products you see at least this three:
-
IBM WebSphere Application Server
Version 8.0.0.5 (8.0.5.20121022_1902) -
IBM HTTP Server for WebSphere Application Server
Version 8.0.0.5 (8.0.5.20121022_1902) -
Web Server Plug-ins for IBM WebSphere Application Server
Version 8.0.0.5 (8.0.5.20121022_1902)