The general information for configuring an existing reverse proxy also applies to the configuration of a load balancer. This note assumes that you have followed the steps in the section Install Additional Web Server Instances (under "High-Availability Features in the Middle Tier") in the SAS® 9.4 Administration Guide.
For example, consider the following topology. A load balancer (my-sas-web.company.com) distributes traffic to two SAS Web Servers.

This SAS KB article points out the differences between the steps that are required for configuring an existing reverse proxy and those that are needed for configuring a load balancer. (The steps are taken from the section Configure the Middle Tier to Use an Existing Customer Reverse Proxy in the SAS® 9.4 Intelligence Platform: Middle-Tier Administration Guide, Fourth Edition.)
The steps for configuring the load balancer are as follows:
-
- Open the server.xml file that resides in the SAS-configuration-directory\Levn\Web\WebAppServer\SASServern_m\conf\.
2. In the file, locate the /Service/Connector element. In that element, change the value for proxyName and check the values for proxyPort and scheme, as shown below:
-
- proxyName="loadbalancer.example.com" proxyPort="443"
-
- redirectPort="${bio.https.port}" scheme="https"
- useBodyEncodingForURI="true"
3. Make the following changes in the either the setenv.sh file (UNIX) or the wrapper.conf file (Microsoft Windows), which also reside in SAS-configuration-directory\Levn\Web\WebAppServer\SASServern_m\conf\.
-
- -Dsas.scs.cas.scheme=protocol
-
- -Dsas.scs.cas.host=loadbalancer.example.com
-
- -Dsas.scs.cas.port=port_number
-
- -Dsas.scs.svc.scheme=protocol
-
- -Dsas.scs.svc.host=loadbalancer.example.com
-
- -Dsas.scs.svc.port=port_number
-
- -Dsas.web.html.cdps.use.internal.urls=true
-
- -Dsas.retry.internal.url=true
- -Dsas.scs.svc.internal.url=http://loadbalancer.example.com:port_number
4. Use SAS® Management Console to change the internal connection for each SAS web application. Some applications, such as SAS Visual Analytics, are nested, and you must expand them to access all the underlying applications. For more information, see Specify Connection Properties in the SAS® 9.4 Administration guide .
Notes:
-
- To use SAS Management Console to modify the Themes Connection information, ensure that the SAS® middle tier is running.
-
- To change the port and protocol values for SASTheme_default, follow these steps:
-
- On the Plug-ins tab in SAS Management Console, select Application Management ►Configuration Manager ►SAS Themes.
- Right-click SASTheme_default and select Properties. Check the properties to determine connection information and update it to point to the load-balancer host, port, and protocol for the internal connection only.
- The following steps (5a -c and 6), also from Configure the Middle Tier to Use an Existing Customer Reverse Proxy, contain the information that is necessary for configuring the load balancer.
-
- Update SAS® Environment Manager by editing the following files and locating all instances of the URLs that begin with http://server:port. Modify them to point to https://server:port:
- Edit the security-web-context.xml (which resides in SAS-configuration-directory\Levn\Web\SASEnvironmentManager\server-version-EE\hq-engine\hq-server\webapps\ROOT\WEB-INF\spring\) as follows:
-
- Locate the bean definition that contains id="logoutFilter". This definition has two constructor arguments, each containing a URL. The first argument specifies the SAS Logon Manager logoff URL. Appended to that URL is the default entry point for SAS Environment Manager. Update the SAS Logon Manager logoff URL to go through the load balancer.
- Locate the bean definition that contains id="casAuthenticationEntryPoint". This definition has a property name="loginUrl" with a value that specifies the SAS Logon Manager logon URL. This value is called by the web browser. Update the SAS Logon Manager logon URL to go through the load balancer.
- Edit the WEB-INF\web.xml file (in the SAS-configuration-directory\Levn\Web\SASEnvironmentManager\server-version-EE\hq-engine\hq-server\webapps\ROOT\ directory) and update the SAS Logon URL in the following lines with the existing customer reverse-proxy information for your environment. For the line with two constructor arguments, the SAS Logon URL is the first URL.
- For SAS 9.4M4 and earlier releases, locate the following lines and enter the correct information for your environment:
<param-value>https://server:ssl-port/SASWebDoc</param-value>
<param-value>https://server:ssl-port/SASEnvironmentMgrMidTier</param-value>
<param-value>https://server:ssl-port/SASLogon/TimedOut.do?sas_svcs_logon_LogonUrl=http://server:ev-server-port/</param-value>
- Starting with SAS 9.4M5, locate the following lines and enter the correct information for your environment:
<param-value>https://server:ssl-port/SASEnvironmentMgrMidTier</param-value>
<param-value>https://server:ssl-port/SASLogon/TimedOut.do?sas_svcs_logon_LogonUrl=http://server:ev-server-port/</param-value>
- Restart SAS Environment Manager.
- If SAS Grid Manager for Platform is deployed in your environment, update the following variables to point to the reverse proxy configuration:
- For Windows deployments, edit the wrapper.conf file that resides in SAS-configuration-directory\Levn\Web\WebAppServer\SASServer14_1\conf\ by updating these variables:
set.CAS_SERVER_LOGIN_URL=http(s)://loadbalancer.example.com:port/SASLogon/login set.PWS_SERVER_URL=http(s)://loadbalancer.example.com:port
- For UNIX deployments, edit the SAS-configuration-directory\Levn\Web\WebAppServer\SASServer14_1\bin\setenv.sh file and update these variables:
CAS_SERVER_LOGIN_URL=http(s)://loadbalancer.example.com:port/SASLogon/login
PWS_SERVER_URL=http(s)://loadbalancer.example.com:port
In addition, update the SAS Grid Manager for Platform resource in SAS Environment Manager. Set the pws.ticket.url value to http(s)://loadbalancer.example.com:port/PlatformWebServices, so the correct URL is used during authentication.