def lighttpd(fp=None, **options): directives = [] for mount_point in staticmedia.get_mount_points(): directives.append('alias.url += ( "%s" => "%s" )' % mount_point) if fp: fp.write('\n'.join(directives)) else: return '\n'.join(directives)
def apache(fp=None, **options): directives = [] for mount_url, mount_path in staticmedia.get_mount_points(): directives.append('Alias "%s" "%s"' % (mount_url, mount_path)) if 'diroptions' in options: directives.append( '<Directory "%s">\n Options %s\n</Directory>' % (mount_path, options['diroptions'])) if fp: fp.write('\n'.join(directives)) else: return '\n'.join(directives)
def nginx(fp=None, **options): directives = [] for mount_point in staticmedia.get_mount_points(): if not options: directives.append('location %s { alias %s; }' % mount_point) else: params = (' '.join(map(lambda i: '%s %s;' % i, options.items())),) directive = 'location %s { alias %s; %s }' % (mount_point + params) directives.append(directive) if fp: fp.write('\n'.join(directives)) else: return '\n'.join(directives)
def apache(fp=None, **options): directives = [] for mount_url, mount_path in staticmedia.get_mount_points(): directives.append( 'Alias "%s" "%s"' % (mount_url, mount_path)) if 'diroptions' in options: directives.append( '<Directory "%s">\n Options %s\n</Directory>' % ( mount_path, options['diroptions'])) if fp: fp.write('\n'.join(directives)) else: return '\n'.join(directives)
def nginx(fp=None, **options): directives = [] for mount_point in staticmedia.get_mount_points(): if not options: directives.append('location %s { alias %s; }' % mount_point) else: params = (' '.join(map(lambda i: '%s %s;' % i, options.items())), ) directive = 'location %s { alias %s; %s }' % (mount_point + params) directives.append(directive) if fp: fp.write('\n'.join(directives)) else: return '\n'.join(directives)
SERVICE_NAME = 'Jappix' # SERVICE DESCRIPTION SERVICE_DESC = 'a free distributed social network' # JAPPIX RESOURCE JAPPIX_RESOURCE = 'Jappix' # BINDING HTTP-BASE (generally : bosh/http-bind/bind) HTTP_BASE = 'bosh' # SECURED HTTP CONNECTIONS WITH SSL (on/off) SSL = 'off' # LOCK TO THE DEFINED HOST (on/off) LOCK_HOST = 'off' # ALL PAGES COMPRESSED WITH GZIP (on/off) GZIP = 'on' # ANONYMOUS MUC CONNECTIONS ALLOWED (on/off) ANONYMOUS_ENABLED = 'off' # DISABLE THE CACHING WITH THE DEVELOPER MODE (on/off) DEVELOPER_MODE = 'off' # MEDIA ALIAS FOR USING IN JAVASCRIPT if not settings.STATICMEDIA_MOUNTS: MEDIA_ALIAS = get_mount_points()[0][0] #'/appmedia/habahaba'