Professional Documents
Culture Documents
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...
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)
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!
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
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...
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.
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...
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
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.
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.
Send a signal 2 to the service to restart it. See command and image below.
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...
6319 Views
Comments
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.
(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