From e289da7cb52f4ff2a090af63c9494d328ffd2a73 Mon Sep 17 00:00:00 2001 From: Marc Date: Fri, 17 Oct 2014 15:23:02 +0000 Subject: [PATCH] Fixes on apache2 backend --- orchestra/apps/websites/backends/apache.py | 3 ++- orchestra/apps/websites/settings.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/orchestra/apps/websites/backends/apache.py b/orchestra/apps/websites/backends/apache.py index 8d002eaf..45077efe 100644 --- a/orchestra/apps/websites/backends/apache.py +++ b/orchestra/apps/websites/backends/apache.py @@ -29,7 +29,7 @@ class Apache2Backend(ServiceController): apache_conf = Template(textwrap.dedent("""\ # {{ banner }} - + 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, diff --git a/orchestra/apps/websites/settings.py b/orchestra/apps/websites/settings.py index f5f33c14..256e1b50 100644 --- a/orchestra/apps/websites/settings.py +++ b/orchestra/apps/websites/settings.py @@ -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')