cubicweb/apache/vhost.tmpl
author David Douard <david.douard@logilab.fr>
Wed, 22 Jul 2015 14:51:15 +0200
changeset 58 f158714afa72
parent 10 f0ac4b0af639
child 132 d1d9f951bebc
permissions -rw-r--r--
[cubicweb] use decent default values for several pillar parameters

<VirtualHost *:80>
    ServerName  {{ vhostname }}
    DocumentRoot /var/www/{{ vhostname }}
    ServerAdmin sysadmin@logilab.fr

    CustomLog /var/log/apache2/{{ vhostname }}-access.log combined2
    ErrorLog /var/log/apache2/{{ vhostname }}-error.log

    <Directory /var/www/{{ vhostname }}>
        Order allow,deny
        Allow from all
        Options MultiViews FollowSymLinks
    </Directory>

    ProxyRequests Off

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
{% for name, config in vhost.iteritems() %}
    Include /etc/apache2/siteconf.d/{{ vhostname }}/*.conf
    ProxyPass {{ config.cwapp.get('basepath', '/') }} http://{{config.cwapp.backend}}:{{ config.cwapp.port }}/
    ProxyPassReverse {{ config.cwapp.get('basepath', '/') }} http://{{ config.cwapp.backend }}:{{ config.cwapp.port }}/
{% endfor %}
</VirtualHost>