05-16-2014 08:29 AM
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?
05-19-2014 03:38 PM
Are you aware that SAS provides their own web server in 9.4 replacing the need for third-party ones? It would be worth exploring how you could include your static content on the SAS web server.
05-19-2014 03:41 PM
sorry for not being clear, that *is* what i meant to ask:
what is the best practise for serving this static content from the sas 9.4 web server?
05-21-2014 07:40 PM
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.
09-30-2016 06:25 PM - edited 10-03-2016 02:47 AM
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