92 lines
2.7 KiB
Plaintext
92 lines
2.7 KiB
Plaintext
# Configuration file maintained by Juju. Local changes may be overwritten.
|
|
|
|
{% if port -%}
|
|
Listen {{ port }}
|
|
{% endif -%}
|
|
|
|
{% if admin_port -%}
|
|
Listen {{ admin_port }}
|
|
{% endif -%}
|
|
|
|
{% if public_port -%}
|
|
Listen {{ public_port }}
|
|
{% endif -%}
|
|
|
|
{% if port -%}
|
|
<VirtualHost *:{{ port }}>
|
|
WSGIDaemonProcess {{ service_name }} processes={{ processes }} threads={{ threads }} user={{ user }} group={{ group }} \
|
|
display-name=%{GROUP}
|
|
WSGIProcessGroup {{ service_name }}
|
|
WSGIScriptAlias / {{ script }}
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
WSGIPassAuthorization On
|
|
<IfVersion >= 2.4>
|
|
ErrorLogFormat "%{cu}t %M"
|
|
</IfVersion>
|
|
ErrorLog /var/log/apache2/{{ service_name }}_error.log
|
|
CustomLog /var/log/apache2/{{ service_name }}_access.log combined
|
|
|
|
<Directory /usr/bin>
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
<IfVersion < 2.4>
|
|
Order allow,deny
|
|
Allow from all
|
|
</IfVersion>
|
|
</Directory>
|
|
</VirtualHost>
|
|
{% endif -%}
|
|
|
|
{% if admin_port -%}
|
|
<VirtualHost *:{{ admin_port }}>
|
|
WSGIDaemonProcess {{ service_name }}-admin processes={{ admin_processes }} threads={{ threads }} user={{ user }} group={{ group }} \
|
|
display-name=%{GROUP}
|
|
WSGIProcessGroup {{ service_name }}-admin
|
|
WSGIScriptAlias / {{ admin_script }}
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
WSGIPassAuthorization On
|
|
<IfVersion >= 2.4>
|
|
ErrorLogFormat "%{cu}t %M"
|
|
</IfVersion>
|
|
ErrorLog /var/log/apache2/{{ service_name }}_error.log
|
|
CustomLog /var/log/apache2/{{ service_name }}_access.log combined
|
|
|
|
<Directory /usr/bin>
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
<IfVersion < 2.4>
|
|
Order allow,deny
|
|
Allow from all
|
|
</IfVersion>
|
|
</Directory>
|
|
</VirtualHost>
|
|
{% endif -%}
|
|
|
|
{% if public_port -%}
|
|
<VirtualHost *:{{ public_port }}>
|
|
WSGIDaemonProcess {{ service_name }}-public processes={{ public_processes }} threads={{ threads }} user={{ user }} group={{ group }} \
|
|
display-name=%{GROUP}
|
|
WSGIProcessGroup {{ service_name }}-public
|
|
WSGIScriptAlias / {{ public_script }}
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
WSGIPassAuthorization On
|
|
<IfVersion >= 2.4>
|
|
ErrorLogFormat "%{cu}t %M"
|
|
</IfVersion>
|
|
ErrorLog /var/log/apache2/{{ service_name }}_error.log
|
|
CustomLog /var/log/apache2/{{ service_name }}_access.log combined
|
|
|
|
<Directory /usr/bin>
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
<IfVersion < 2.4>
|
|
Order allow,deny
|
|
Allow from all
|
|
</IfVersion>
|
|
</Directory>
|
|
</VirtualHost>
|
|
{% endif -%}
|