File openstack-dashboard.conf.sample.suse of Package openstack-dashboard

#
# OpenStack Horizon (Dashboard) Apache2 example configuration.
#
# Required Apache2 modules:
#  - mod_rewrite (If you use the port 80 -> 443 rewrite rule below)
#  - mod_ssl (If you enable the HTTPS vhost)
#

<VirtualHost *:80>
    ServerName openstack-dashboard.example.com
    ServerAdmin webmaster@openstack-dashboard.example.com

    ErrorLog /var/log/apache2/openstack-dashboard-error_log
    TransferLog /var/log/apache2/openstack-dashboard-access_log

    WSGIScriptAlias / /srv/www/openstack-dashboard/openstack_dashboard/wsgi.py
    WSGIDaemonProcess horizon user=wwwrun group=www processes=3 threads=10
    WSGIApplicationGroup %{GLOBAL}
    WSGIProcessGroup horizon
    SetEnv APACHE_RUN_USER  wwwrun
    SetEnv APACHE_RUN_GROUP www

    DocumentRoot /srv/www/openstack-dashboard/
    Alias /media /srv/www/openstack-dashboard/media
    Alias /static /srv/www/openstack-dashboard/static

    <Location /static>
        SetOutputFilter DEFLATE
        ExpiresActive On
        ExpiresDefault "access plus 1 month"
    </Location>

    <Directory /srv/www/openstack-dashboard/>
        Options FollowSymLinks MultiViews
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>


<IfDefine SSL>
<IfDefine !NOSSL>

# Uncomment the following if you want to redirect all HTTP traffic to HTTPS.
# Make sure to comment out the above <VirtualHost *:80>
#RewriteEngine On
#RewriteCond %{SERVER_PORT} ^80$
#RewriteRule / https://%{HTTP_HOST}%{REQUEST_URI} [L,R]

<VirtualHost *:443>
    ServerName openstack-dashboard.example.com
    ServerAdmin webmaster@openstack-dashboard.example.com

    ErrorLog /var/log/apache2/openstack-dashboard-error_log
    TransferLog /var/log/apache2/openstack-dashboard-access_log

    SSLEngine On
    # Generate those certificates by running
    # (umask 377 ; /usr/bin/gensslcert -C openstack-dashboard -n $(hostname -fqdn))
    SSLCertificateFile /etc/apache2/ssl.crt/openstack-dashboard-server.crt
    SSLCertificateKeyFile /etc/apache2/ssl.key/openstack-dashboard-server.key

    DocumentRoot /srv/www/openstack-dashboard/
    Alias /media /srv/www/openstack-dashboard/media
    Alias /static /srv/www/openstack-dashboard/static

    <Location /static>
        ExpiresActive on
        ExpiresDefault "access plus 1 month"
    </Location>

    <Location /static>
        SetOutputFilter DEFLATE
        ExpiresActive On
        ExpiresDefault "access plus 1 month"
    </Location>

    <Directory /srv/www/openstack-dashboard/>
        Options FollowSymLinks MultiViews
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>

</IfDefine>
</IfDefine>

openSUSE Build Service is sponsored by