Fixes on apache2 backend

This commit is contained in:
Marc 2014-10-17 15:23:02 +00:00
parent 8a818ecb87
commit e289da7cb5
2 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class Apache2Backend(ServiceController):
apache_conf = Template(textwrap.dedent("""\
# {{ banner }}
<VirtualHost *:{{ site.port }}>
<VirtualHost {{ id }}:{{ site.port }}>
ServerName {{ site.domains.all|first }}\
{% if site.domains.all|slice:"1:" %}
ServerAlias {{ site.domains.all|slice:"1:"|join:' ' }}{% endif %}
@ -162,6 +162,7 @@ class Apache2Backend(ServiceController):
context = {
'site': site,
'site_name': site.name,
'ip': settings.WEBSITES_DEFAULT_IP,
'site_unique_name': site.unique_name,
'user': site.account.username,
'group': site.account.username,

View File

@ -11,6 +11,9 @@ WEBSITES_PORT_CHOICES = getattr(settings, 'WEBSITES_PORT_CHOICES', (
WEBSITES_DEFAULT_PORT = getattr(settings, 'WEBSITES_DEFAULT_PORT', 80)
WEBSITES_DEFAULT_IP = getattr(settings, 'WEBSITES_DEFAUL_IP', '*')
WEBSITES_DOMAIN_MODEL = getattr(settings, 'WEBSITES_DOMAIN_MODEL', 'domains.Domain')