Fixes on payments and php webapps
This commit is contained in:
parent
e0d31f67e4
commit
120506229a
2
TODO.md
2
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?
|
||||
|
|
|
@ -60,6 +60,9 @@ 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:
|
||||
if AppOption.get(name).comma_separated:
|
||||
options[name] = options[name].rstrip(',') + ',' + value.lstrip(',')
|
||||
else:
|
||||
options[name] = max(options[name], value)
|
||||
else:
|
||||
options[name] = value
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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/
|
||||
<Location /fcgi-bin/>
|
||||
|
@ -249,7 +250,6 @@ class Apache2Backend(ServiceController):
|
|||
Options +ExecCGI
|
||||
</Location>
|
||||
""") % context
|
||||
context['vhost_wrapper_dirs'].append(context['wrapper_dir'])
|
||||
directives += self.get_location_filesystem_map(context)
|
||||
directives += textwrap.dedent("""
|
||||
ProxyPass %(location)s/ !
|
||||
|
|
Loading…
Reference in New Issue