diff --git a/TODO.md b/TODO.md index 951032e7..28079dfe 100644 --- a/TODO.md +++ b/TODO.md @@ -434,3 +434,5 @@ serailzer self.instance on create. * backendLog store method and language... and use it for display_script with correct lexer # process monitor data to represent state, or maybe create new resource datas when period expires? + +# DNS when AAAA is specified include default A register? diff --git a/orchestra/contrib/webapps/models.py b/orchestra/contrib/webapps/models.py index 95fdeca6..badee75d 100644 --- a/orchestra/contrib/webapps/models.py +++ b/orchestra/contrib/webapps/models.py @@ -60,7 +60,10 @@ class WebApp(models.Model): qs = WebAppOption.objects.filter(**kwargs) for name, value in qs.values_list('name', 'value').order_by('name'): if name in options: - options[name] = max(options[name], value) + if AppOption.get(name).comma_separated: + options[name] = options[name].rstrip(',') + ',' + value.lstrip(',') + else: + options[name] = max(options[name], value) else: options[name] = value return options diff --git a/orchestra/contrib/webapps/options.py b/orchestra/contrib/webapps/options.py index c132d372..f4b463be 100644 --- a/orchestra/contrib/webapps/options.py +++ b/orchestra/contrib/webapps/options.py @@ -17,6 +17,7 @@ class AppOption(Plugin): help_text = "" group = None + comma_separated = False @classmethod @cached @@ -100,6 +101,7 @@ class PHPEnableFunctions(PHPAppOption): for i in range(0, len(settings.WEBAPPS_PHP_DISABLED_FUNCTIONS), 10) ]) regex = r'^[\w\.,-]+$' + comma_separated = True class PHPAllowURLInclude(PHPAppOption): diff --git a/orchestra/contrib/websites/backends/apache.py b/orchestra/contrib/websites/backends/apache.py index 7521bb8b..4413de3d 100644 --- a/orchestra/contrib/websites/backends/apache.py +++ b/orchestra/contrib/websites/backends/apache.py @@ -40,7 +40,7 @@ class Apache2Backend(ServiceController): def render_virtual_host(self, site, context, ssl=False): context['port'] = self.HTTPS_PORT if ssl else self.HTTP_PORT - context['vhost_wrapper_dirs'] = [] + context['vhost_set_fcgid'] = False extra_conf = self.get_content_directives(site, context) directives = site.get_directives() if ssl: @@ -238,10 +238,11 @@ class Apache2Backend(ServiceController): directives = '' # This Action trick is used instead of FcgidWrapper because we don't want to define # a new fcgid process class each time an app is mounted (num proc limits enforcement). - context['wrapper_dir'] = os.path.dirname(wrapper_path) - if context['wrapper_dir'] not in context['vhost_wrapper_dirs']: + if not context['vhost_set_fcgid']: # fcgi-bin only needs to be defined once per vhots # We assume that all account wrapper paths will share the same dir + context['wrapper_dir'] = os.path.dirname(wrapper_path) + context['vhost_set_fcgid'] = True directives = textwrap.dedent("""\ Alias /fcgi-bin/ %(wrapper_dir)s/ @@ -249,7 +250,6 @@ class Apache2Backend(ServiceController): Options +ExecCGI """) % context - context['vhost_wrapper_dirs'].append(context['wrapper_dir']) directives += self.get_location_filesystem_map(context) directives += textwrap.dedent(""" ProxyPass %(location)s/ !