It's all about the answers!

Ask a question

How do I redirect my default port 80 to "mywebsite/jts"


Kevin Armentrout (2112) | asked Jan 14 '13, 9:49 a.m.

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


permanent link
Guido Schneider (3.4k1491115) | answered Jan 16 '13, 4:11 a.m.

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

Kevin Armentrout selected this answer as the correct answer

Comments
Kevin Armentrout commented Jan 16 '13, 7:07 a.m. | edited Jan 16 '13, 7:09 a.m.

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. ???????


Kevin Armentrout commented Jan 16 '13, 7:15 a.m.

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



permanent link
Mike Pawlowski (6861) | answered Jan 15 '13, 2:42 p.m.
JAZZ DEVELOPER
 
Hi Kevin

This is more of a Websphere specific question.

>> I think the answer is to install "IBM HTTP Server" and setup a rewrite rule.

I don't think this should be necessary.
You should be able to do the redirection entirely inside of Websphere Application Server (WAS) by enabling a native module and using redirection rules. See the following links for some ideas:

http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14819317
http://publib.boulder.ibm.com/httpserv/ihsdiag/plugin_alter_uri.html

HTH

permanent link
Guido Schneider (3.4k1491115) | answered Jan 16 '13, 7:37 a.m.
edited Jan 16 '13, 7:42 a.m.

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
Guido Schneider commented Jan 16 '13, 7:41 a.m.

How can I post HTML code, so it is not rendered with this editor?


Kevin Armentrout commented Jan 16 '13, 8:57 a.m.

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?


Guido Schneider commented Jan 16 '13, 9:11 a.m.

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 ]


Kevin Armentrout commented Jan 16 '13, 9:27 a.m.

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.


Guido Schneider commented Jan 16 '13, 10:50 a.m.

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


Kevin Armentrout commented Jan 16 '13, 11:53 a.m.

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!

showing 5 of 6 show 1 more comments

permanent link
Kevin Armentrout (2112) | answered Jan 18 '13, 10:06 a.m.
Hey Gus, I downloaded and installed the plugin but havn't had much success.  It didn't generate the above module you listed in the httpd.conf file.  I'm really not sure where to go from here.  I guess I'm stuck at telling users to go to the direct link and hope nobody complains.  If you have any links that would educate me a little more I'll gladly except them.  Thanks for all your help

Comments
Guido Schneider commented Jan 18 '13, 10:18 a.m.

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)


permanent link
Kevin Armentrout (2112) | answered Jan 18 '13, 1:06 p.m.
Hey Gus, I had to go back to a vm snapshot because users were complaining about latency issues and error messages inside of team server.  I deployed RTC 4.0 with SQL 2K8R2 as a backend.  I installed the IBM http server version 8.0.0.5 as well as the web server plugins.  The plugins added a new console under the tools which was pretty nice. The problem is everyone is asking for the tools asap and no time for development.  I think I'll build out another from scratch and put the /jts context roots in / to make it easier.  I do have a PMR open and they said I would have to change the context roots and redeploy the application.  Problem is I have 4 production Lifecycle management projects going right now.  Thanks again for all the help.  I copied this entire post and will help with future problems.  Thanks again.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.