600620a8d5
By default apache spawns only one process for the wsgi app if not specified. This patch detects the number of CPUS to configure n CPUs +1 processes by default and allows to specify the number of processes explicitly. Change-Id: I684ecd15193cef169d7a86f66a47b7d1d76c1c24 Closes-Bug: #1658048
42 lines
1.2 KiB
Plaintext
42 lines
1.2 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 processes={{ PROCESSES }}
|
|
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>
|