Está en la página 1de 6

Give your SAP HANA XS app the sexy URL it deserves! - SAP HANA https://blogs.saphana.com/2013/11/21/give-your-sap-hana-xs-app-the-se...

(https://blogs.saphana.com) Posts (https://blogs.saphana.com/category/uncategorized/) Give your SAP HANA XS app the


sexy URL it deserves!

Give your SAP HANA XS app the sexy URL


it deserves!
Posted by Mark Hourani (https://blogs.saphana.com/author/mark-hourani/) on November 21, 2013
More by this author (https://blogs.saphana.com/author/mark-hourani/)
Tweet Like 0 Share
Share 0 Share 1

Which link do you prefer: http: //mydomain.com:8000/company/appname OR http: //mydomain.com?

Do you want your SAP HANA XS Application to run on standard HTTP and/or HTTPS ports (80, 443
respectively), not only for simplicity, but to avoid firewall issues? If yes, see Section 1 below. Would
you also like to allow users to invoke your XS application just by typing a domain name (e.g.
mydomain.com) without your package path? If yes, see Section 2 below.

Note: These steps were performed on SAP HANA rev 67. These steps are NOT recommended for
HANA One instances. For HANA One it is recommended to use Elastic Load Balancing IP
addresses to achieve the similar goals (not covered here).

SECTION 1: Use a standard port for your web app (Estimated time 10 minutes)

Process Overview
Prerequisite: Make sure you have the right credentials and that your XS app already works
Step 1: Ensure your target port is available
Step 2: Modify web dispatcher profile
Step 3: Enable binding of your XS port to the new listening port
Step 4: Restart your server or webdispatcher
Step 5: Test your app
Troubleshooting

Prerequisite: Make sure you have the right credentials and that your XS app already works

Note: Super-user permissions are required to bind the XS server to a port below 1024. Do not
begin this process if you cannot perform commands as a super user such as root.

Make sure your XS app is already working properly on a typical XS port such as 80<instance_
nbr> where <instance_nbr> is your HANA instance number (e.g. 8000 for instance number 00).
If you already have SSL working your default port is 43<instance_nbr> (e.g. 4300 for instance
number 00).

If you want to use port 443 make sure you already have your application supporting SSL. Here

1 of 6 6/17/17, 6:27 PM
Give your SAP HANA XS app the sexy URL it deserves! - SAP HANA https://blogs.saphana.com/2013/11/21/give-your-sap-hana-xs-app-the-se...

is an SSL guide (http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library


/uuid/00b45687-0613-3110-7183-de49e84a35b0?QuickLink=index&overridelayout=true&
58725087881383) that may be helpful for you.

Step 1: Ensure your target port is available

Make sure your target port is not already occupied (for the remainder of this post I will use port
80 as the target port. Just substitute 80 with 443 if you want to use the standard HTTPS
port).

Connect to your shell using an ssh tool (such as putty) using your HANA administrator ID:
<sid>adm where <sid> is replaced with your HANA instance name (e.g. hdbadm)

Type the following from the linux command line:


netstat -a | grep http

If you see something returned for your target port (http or https) such as below for http, then
something is already running on that port and you should STOP! Do not proceed until you
determine what it is, shut it down, and remove it from start scripts, if appropriate.

If nothing is returned as shown below, then you are safe to continue to the next step!

Step 2: Modify web dispatcher profile

Edit the following file: /usr/sap/<SID>/HDB<instance_nbr>/<hostname>/wdisp/sapwebdisp.pfl

For example:

vi /usr/sap/HDB/HDB00/hanaserver/wdisp/sapwebdisp.pfl

Comment out one or both of the following two lines using the # symbol
#icm/server_port_0 = PROT=HTTP,PORT=$(_HTTP_PORT),PROCTIMEOUT=600
#icm/server_port_1 = PROT=HTTPS,PORT=$(_HTTPS_PORT),PROCTIMEOUT=600

Add both or one of the following two lines


icm/server_port_0 = PROT=HTTP,PORT=80,EXTBIND=1,PROCTIMEOUT=600
icm/server_port_1 = PROT=HTTPS,PORT=443,EXTBIND=1,PROCTIMEOUT=600

Step 3: Enable binding of your XS port to the new listening port

Note: This step requires superuser permissions and needs to be done by a super user such as
root.

2 of 6 6/17/17, 6:27 PM
Give your SAP HANA XS app the sexy URL it deserves! - SAP HANA https://blogs.saphana.com/2013/11/21/give-your-sap-hana-xs-app-the-se...

Change to the following folder: /usr/sap/<sid>/HDB<instance_nbr>/exe/ substituting your info


in the brackets as shown below:
cd /usr/sap/HDB/HDB00/exe/

copy icmbnd.new to icmbnd


cp icmbnd.new icmbnd

Change the owner of the icmbnd command


chown root:sapsys icmbnd

Change the permissions for the icmbnd command:


chmod 4750 icmbnd

Check the new permissions for the icmbnd command:


ls al

The result should look like the following:


rwsr-x 1 root sapsys 1048044 Feb 13 16:19 icmbnd

Step 4: Restart your HANA server or webdispatcher

To keep it simple, restart your HANA Server logged in using your HANA admin user <sid>adm:
HDB stop
HDB start

Alternatively, you can just restart your web dispatcher by following the steps outlined in section
3 of this post. Then return to Step 5 below.

Step 5: Test your app

From a browser, try testing your application using the same url but with the new port number
(or without any port number).

Troubleshooting

Check the following web dispatcher trace file for errors: /usr/sap/<SID>/HDB<instance_nbr>
/<hostname>/trace/dev_webdisp

vi /usr/sap/HDB/HDB00/hanaserver/trace/dev_webdisp

SECTION 2: Avoid typing the XS package name to invoke your site URL (Estimated time 5
minutes)

This section explains how to redirect requests made to the root of your domain, to your preferred SAP
HANA XS package path (e.g. http: //mydomain.com will redirect the user to http: //mydomain.com
/company/package).

Process Overview
Step 1: Modify web dispatcher profile
Step 2: Restart your server or web dispatcher
Step 3: Test your app

3 of 6 6/17/17, 6:27 PM
Give your SAP HANA XS app the sexy URL it deserves! - SAP HANA https://blogs.saphana.com/2013/11/21/give-your-sap-hana-xs-app-the-se...

Step 1: Modify web dispatcher profile

Edit the following file: /usr/sap/<SID>/HDB<instance_nbr>/<hostname>/wdisp/sapwebdisp.pfl


vi /usr/sap/HDB/HDB00/hanaserver/wdisp/sapwebdisp.pfl

Add the following line, substituting the information in brackets:


icm/HTTP/redirect_0 = PREFIX=/, FROM=/, TO=</company/package/>, PROT=HTTP,
HOST=<mydomain.com>, PORT=80

To support the example presented in the beginning of this section, you would add the following
line:
icm/HTTP/redirect_0 = PREFIX=/, FROM=/, TO=/company/package/, PROT=HTTP,
HOST=mydomain.com, PORT=80

Step 2: Restart your HANA server or web dispatcher

To keep it simple, restart your HANA Server logged in using your HANA admin user <sid>adm:
HDB stop
HDB start

Alternatively, you can just restart your web dispatcher by following the steps outlined in section
3 of this post. Then return to Step 3 below.

Step 3: Test your new URL

From a browser, invoke your URL without any path. You should be redirected to your full URL.

Troubleshooting

Check the following web dispatcher trace file for errors: /usr/sap/<SID>/HDB<instance_nbr>
/<hostname>/trace/dev_webdisp

vi /usr/sap/HDB/HDB00/hanaserver/trace/dev_webdisp

SECTION 3 (Optional): Restart your web dispatcher without restarting the entire HANA server

Follow these steps to restart your web dispatcher, only if you chose not to restart your HANA server
as shown in the previous sections.

Retrieve the process ID for the webdisp_hdb server:

ps -ef | grep <sid>adm

Send a signal 2 to the service to restart it. See command and image below.

sapcontrol -nr <instance_nr> -function SendSignal <process_id> 2

4 of 6 6/17/17, 6:27 PM
Give your SAP HANA XS app the sexy URL it deserves! - SAP HANA https://blogs.saphana.com/2013/11/21/give-your-sap-hana-xs-app-the-se...

Average User Rating

Rating: 4.5/5 (2 votes cast)

6319 Views

Previous (https://blogs.saphana.com Next (https://blogs.saphana.com/2013/11


/2013/11/21/sap-smart-business-cockpits- /22/big-data-webinar-series-a-theme-
a-battlefield-for-positive-outcomes/) that-resonated-in-2013/)

Comments

1. Bumjin Kim (Https://blogs.saphana.com/author/bumjin-kim/) on October 12, 2016

Your articles are so nice and helpful.


Thanks a lot!
Log in to Reply (https://blogs.saphana.com/wp-login.php?redirect_to=https%3A%2F
%2Fblogs.saphana.com%2F2013%2F11%2F21%2Fgive-your-sap-hana-xs-app-the-sexy-url-it-deserves%2F)
Like (97154) (1)

Leave a Reply
You must be logged in (https://blogs.saphana.com/wp-login.php?redirect_to=https%3A%2F
%2Fblogs.saphana.com%2F2013%2F11%2F21%2Fgive-your-sap-hana-xs-app-the-sexy-url-it-deserves%2F) to

5 of 6 6/17/17, 6:27 PM
Give your SAP HANA XS app the sexy URL it deserves! - SAP HANA https://blogs.saphana.com/2013/11/21/give-your-sap-hana-xs-app-the-se...

post a comment.

United States 2014 SAP SE Legal (http://www.sap.com/corporate-en/our-company/legal/impressum.epx)

(https://www.facebook.com/HANAbySAP) (https://twitter.com/sapinmemory)
(https://www.youtube.com/user/saptechnology) (https://www.linkedin.com/groups?gid=3683024)
(http://www.slideshare.net/saptechnology) (mailto:asksaphana@sap.com) Follow & Share

6 of 6 6/17/17, 6:27 PM

También podría gustarte