IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

IBM HTTP web server - redirect http to https


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu May 17, 2018 12:32 am
Reply with quote

Hi,

I am trying to convert our IBM HTTP server V5R3 to use https instead of http.

Before the conversion,
httpd.conf has
Code:
Pass            /systems/*         /publish/systems/*

and this would make
Code:
http://MFSERVER/systems
map to the USS file
Code:
/publish/systems/


This is ok so far.

Could you please let me know how to redirect all the visits to the link http://MFSERVER/systems to https://MFSERVER/systems automatically.

I looked at the Redirect directive, But I don't know how to use it to route from http to https.

Thanks in advance,
Vasanth.S
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu May 17, 2018 9:54 am
Reply with quote

"redirect http to https" for Google argument will give results that can be useful for you.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu May 17, 2018 10:45 pm
Reply with quote

Thanks Peter, I did look up the google, but there are specifications for Apache servers or other type of server configurations. I was unable to find anything related to IBM HTTP server.

We could change the HTML of the page to perform the redirect from http to https, but that would mean that we have to change all the individual web pages that we are hosting.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri May 18, 2018 4:28 am
Reply with quote

this may be of use

www-01.ibm.com/support/docview.wss?uid=swg21114864
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 18, 2018 11:02 pm
Reply with quote

Thank you Dave, that link is exactly my requirement & it also has a nice solution. However I guess I have to wait until our operating system is upgraded.

The solution on the link was for Apache server and currently we are running only IBM HTTP Server V5R3. We are due to get a Apache server along with z/OS 2.2.

Regards,
Vasanth.S
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Jul 18, 2018 4:50 am
Reply with quote

Thank you very much Dave,
I installed Apache at our site and your solution here www-01.ibm.com/support/docview.wss?uid=swg21114864 works perfectly.

The only quirk I had to figure out was,
The link asks to add these lines to the config,
Code:
RewriteEngine on
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

But it came up with error,
Code:
AH00526: Syntax error on line 916 of /usspath/httpd.conf: RewriteRule: bad flag delimiters

So converted the lines to EBCDIC037 encoding using SAS
Code:
%LET FILEIN  = WELLS.INPUT;                             
%LET FILEOUT = WELLS.OUTPUT;                             
FILENAME OUT "&FILEOUT." DISP=OLD ENCODING= 'EBCDIC037';
FILENAME IN "&FILEIN." DISP=SHR;                         
DATA _NULL_;                                             
INFILE IN;                                               
INPUT;                                                   
FILE OUT;                                               
PUT _INFILE_;                                           
RUN;                                                     

To these cards,
Code:
RewriteEngine on                                           
RewriteCond %{SERVER_PORT} =80                             
RewriteRule ¬(.*) https://%{SERVER_NAME}%{REQUEST_URI} ÝR,L¨

Then it worked like a charm :-)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Z Monitoring server fails to start IBM Tools 1
No new posts The z/OS HTTP/HTTPS protocol PL/I & Assembler 6
No new posts FTP datasets to server CLIST & REXX 13
No new posts Anyone using the HTTP server, web app... All Other Mainframe Topics 0
Search our Forums:

Back to Top