in sas 9.3 i had Apache configured as reverse proxy to the SAS webapps.
i used Apache to serve the SAS Themes and my custom html/js/css files.
mid-tier architecture changed somewhat from 9.3 to 9.4
what is the best practise for serving this static content in sas 9.4?
Quoting the SAS 9.4 Intelligence Platform: Middle-Tier Administration Guide, Second Edition in the About SAS Web Server section:
SAS Web Server is an HTTP server. The server is based on VMware vFabric Web Server. SAS configures the server with the following features:
- automatically configured as a load-balancing HTTP server when SAS Web Application Server is clustered.
- automatically updated to route web sessions (round robin) to SAS Web Application Server instances when clustered.
- can be configured for HTTPS automatically. You must supply a signed certificate and a private key. You can follow manual steps to change a configuration that used HTTP to HTTPS.
Additionally the VMware vFabric Web Server (now know as Pivotal Web Server) is based on Apache Web Server. Your existing knowledge of configuring Apache for use with prior versions of SAS can be reused with the SAS Web Server. You won't need to configure any reverse proxying of the SAS web applications (from the SAS Web Application Server) or the deployment of static SAS contents (themes etc) as that is all set up during SAS installation (including caching of themes). If you look in your equivalent of the SAS Web Server configuration include-file /opt/sas94/config/Lev1/Web/WebServer/conf/sas.conf you will see this pre-configuration all in place.
With regard to your own custom static content you could either configure a separate web server instance to server it for you, or take advantage of the existing SAS Web Server. Re-using the SAS Web Server would use less resources (not that a web server is likely to use much resources compared with the rest of the platform), but any customizations would need to be factored into future upgrade plans.
I'm not suggesting this is a "best practice", but it is a method that works for me. Being on a Linux platform, I add symlinks to the locations of my static content in my SAS Web Server document root: /opt/sas94/config/Lev1/Web/WebServer/htdocs Another alternative is to create a custom.conf file in the /opt/sas94/config/Lev1/Web/WebServer/conf directory and add an include line for it to the end of the httpd.conf file (where you'll see the sas.conf file included). In that custom.conf file you can use an Apache Alias directive in addition to other Apache directives you require.
I hope this helps. I'd be keen to hear what others do too.
Excellent solution Paul. I am getting a forbidden error and to resolve the same, update the SAS webserver conf file setting to include the path (symlinks etc) some thing similart to below
Options +Indexes FollowSymLinks Includes ExecCGI
Allow from all
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.