horizon/openstack_dashboard/management/commands/apache_vhost.conf.template
Yves-Gwenael Bourhis 42bc31b386 Detect apache version
We try to detect apache's version.
Some distributions do not allow launching apache commands (even for detection)
if not root, so we gracefully fall back on 2.4 version configuration file
We alse add an --apache-version option to force the version in case
detection would be wrong.

Closes Bug: #1438773

Change-Id: I7d28c319601cf3919068be4ac52dd10f58a82557
2015-04-03 09:51:05 +02:00

42 lines
1.1 KiB
Plaintext

{% if SSL %}
# Set "NameVirtualHost {{ NAMEDHOST }}:443" in your httpd.conf file if it's not already done.
<VirtualHost {{ NAMEDHOST }}:443>
SSLEngine on
SSLCertificateFile {{ SSLCERT }}
SSLCertificateKeyFile {{ SSLKEY }}
{% if CACERT %} SSLCACertificateFile {{ CACERT }}{% endif %}
{% else %}
<VirtualHost {{ NAMEDHOST }}:80>
{% endif %}
ServerAdmin {{ ADMIN }}
ServerName {{ VHOSTNAME }}
DocumentRoot {{ PROJECT_ROOT }}/
LogLevel warn
ErrorLog {{ LOGDIR }}/{{ PROJECT_NAME }}-error.log
CustomLog {{ LOGDIR }}/{{ PROJECT_NAME }}-access.log combined
WSGIScriptReloading On
WSGIDaemonProcess {{ PROJECT_NAME }}_website
WSGIProcessGroup {{ PROJECT_NAME }}_website
WSGIApplicationGroup {{ PROJECT_NAME }}_website
WSGIPassAuthorization On
WSGIScriptAlias / {{ WSGI_FILE }}
{% if APACHE2_VERSION >= 2.4 %}
<Location "/">
Require all granted
</Location>
{% else %}
<Location "/">
Order Allow,Deny
Allow from all
</Location>
{% endif %}
Alias /static {{ STATIC_PATH }}
<Location "/static">
SetHandler None
</Location>
</Virtualhost>