Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
IBM HTTP web server - redirect http to https

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1614
Location: Oregon

PostPosted: Thu May 17, 2018 12:32 am    Post subject: IBM HTTP web server - redirect http to https
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: 2461
Location: Netherlands, Amstelveen

PostPosted: Thu May 17, 2018 9:54 am    Post subject:
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: 1614
Location: Oregon

PostPosted: Thu May 17, 2018 10:45 pm    Post subject:
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: 281
Location: Cincinnati OH USA

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

this may be of use

https://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: 1614
Location: Oregon

PostPosted: Fri May 18, 2018 11:02 pm    Post subject:
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: 1614
Location: Oregon

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

Thank you very much Dave,
I installed Apache at our site and your solution here https://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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts https://github.com/IBM/IBM-Z-zOS enrico-sorichetti All Other Mainframe Topics 0 Fri Aug 24, 2018 11:45 pm
No new posts IBM's FTP not working with TLS encryp... sathyajes TSO/ISPF 10 Tue Aug 21, 2018 1:37 pm
No new posts Defining SSL Port in TCPIP for DB2 Se... Yolanda Harvey TSO/ISPF 1 Wed Mar 28, 2018 7:33 pm
No new posts Migrating Java application from JVM p... danik56 CICS 0 Sat Dec 23, 2017 1:42 pm
No new posts Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 12 Sun Nov 19, 2017 7:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us