# Copyright (c) 2015 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.

####
#    Example configuration script for apache2 webserver
#
#    This assumes the appfwk_project directory `www` has been installed under
#    the root directory /steelscript, and a virtualenv with all the
#    required dependencies has been created in the `virtualenv` directory.
#
#    Make sure to update the paths below to match your configuration
#
####

WSGISocketPrefix /var/run/wsgi
WSGIPythonHome /steelscript/virtualenv

# This section is for unsecured, http access
# To force use of https, comment out this section, and see instructions below
<VirtualHost *:80>
    WSGIPassAuthorization On
    Alias /static /steelscript/www/static
    WSGIScriptAlias / /steelscript/www/steelscript_appfwk.wsgi
    WSGIDaemonProcess steelscript_appfwk processes=2
    WSGIProcessGroup steelscript_appfwk
</VirtualHost>



# This section is for secured, https (SSL) access
# Comment the <VirtualHost> section above, uncomment the lines below,
# including the "NameVirtualHost" line, and generate
# the appropriate server keys as follows:
#   RHEL/CentOS/SL:
#       http://wiki.centos.org/HowTos/Https
#   Debian/Ubuntu:
#       https://wiki.debian.org/Self-Signed_Certificate


#NameVirtualHost *:443

## Redirect all http -> https
#RewriteEngine on
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
#
#<VirtualHost _default_:443>
#        SSLEngine on
#        SSLCertificateFile /etc/pki/tls/certs/ca.crt
#        SSLCertificateKeyFile /etc/pki/tls/private/ca.key
#        Alias /static /steelscript/www/static
#        WSGIScriptAlias / /steelscript/www/steelscript_appfwk.wsgi
#        WSGIDaemonProcess steelscript_appfwk processes=2
#        WSGIProcessGroup steelscript_appfwk
#</VirtualHost>
