mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
make webapp have their own apache conf files
This commit is contained in:
parent
ac59954aee
commit
5476f1c799
1 changed files with 13 additions and 11 deletions
|
@ -511,21 +511,23 @@ def app_install(app, domain, path='/', label=None, mode='private'):
|
|||
##########
|
||||
# Apache #
|
||||
##########
|
||||
if lvl(manifest,'yunohost','webapp','custom_apache_conf'):
|
||||
os.system('mv '+app_tmp_folder+'/'+manifest['yunohost']['webapp']['custom_apache_conf']+' '++a2_settings_path +'/'+ domain +'.d/'+ unique_app_id +'.app.conf')
|
||||
else:
|
||||
a2_conf_lines = [ 'Alias '+ path +' '+ app_final_path + manifest['launch_path'] ]
|
||||
if path != '/':
|
||||
a2_conf_lines.append('Alias '+ path[:len(path)-1] +' '+ app_final_path + manifest['launch_path'])
|
||||
|
||||
a2_conf_lines = [ 'Alias '+ path +' '+ app_final_path + manifest['launch_path'] ]
|
||||
if path != '/':
|
||||
a2_conf_lines.append('Alias '+ path[:len(path)-1] +' '+ app_final_path + manifest['launch_path'])
|
||||
a2_conf_lines.append('<Directory '+ app_final_path +'>')
|
||||
|
||||
a2_conf_lines.append('<Directory '+ app_final_path +'>')
|
||||
if lvl(manifest, 'yunohost', 'webapp', 'language') and manifest['yunohost']['webapp']['language'] == 'php':
|
||||
for line in open(a2_template_path +'/php.conf'): a2_conf_lines.append(line.rstrip())
|
||||
|
||||
if lvl(manifest, 'yunohost', 'webapp', 'language') and manifest['yunohost']['webapp']['language'] == 'php':
|
||||
for line in open(a2_template_path +'/php.conf'): a2_conf_lines.append(line.rstrip())
|
||||
a2_conf_lines.append('</Directory>')
|
||||
|
||||
a2_conf_lines.append('</Directory>')
|
||||
|
||||
with open(a2_settings_path +'/'+ domain +'.d/'+ unique_app_id +'.app.conf', 'w') as a2_conf:
|
||||
for line in a2_conf_lines:
|
||||
a2_conf.write(line + '\n')
|
||||
with open(a2_settings_path +'/'+ domain +'.d/'+ unique_app_id +'.app.conf', 'w') as a2_conf:
|
||||
for line in a2_conf_lines:
|
||||
a2_conf.write(line + '\n')
|
||||
|
||||
|
||||
#########################################
|
||||
|
|
Loading…
Add table
Reference in a new issue