Fixes for ssl with mod_m,d

This commit is contained in:
Antonio de la Rosa 2024-09-05 00:10:10 +02:00
parent 5883de45dd
commit a0fce4f7b6
2 changed files with 5 additions and 4 deletions

View file

@ -110,7 +110,8 @@ def manage():
real_root_dir=args.root_dir+'/htdocs'
aliases='ServerAlias www.'+args.domain
#aliases='ServerAlias www.'+args.domain
aliases=''
if args.aliases:
aliases='ServerAlias '+args.aliases.replace(',', ' ')
@ -213,7 +214,7 @@ def manage():
"RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]")
vhost=vhost.replace('# SSL Options', "\n".join(ssl_options_http))
vhost+="\n\n"+vhost_ssl
vhost=vhost_ssl+"\n\n"+vhost
json_return={'error':0, 'status': 0, 'progress': 100, 'no_progress':0, 'message': 'Creating SSL Cert with Letsencrypt using mod_md...'}
print(json.dumps(json_return))
@ -454,7 +455,7 @@ def manage():
json_return['error']=1
json_return['status']=1
json_return['progress']=100
json_return['message']='Error: the config is wrong '+vhost
json_return['message']='Error: the config is wrong \n'+vhost
# Delete user

View file

@ -71,7 +71,7 @@ class ServerTask(Task):
if 'debug' in self.data:
debug_opt='--debug'
self.commands_to_execute=[['modules/apache/scripts/manage_apache.py', '--operation=add --domain=%s --email=%s --user=%s --root_dir=%s --type_cgi=%s --ip=%s --%s --port=%s %s %s %s' % (self.data['domain'], self.data['email'], self.data['user'], self.data['root_dir'], self.data['cgi_type'], self.data['ip'], debug_opt, self.data['port'], password, indexes, allow_override), 'sudo']]
self.commands_to_execute=[['modules/apache/scripts/manage_apache.py', '--operation=add --domain=%s --email=%s --user=%s --root_dir=%s --type_cgi=%s --ip=%s %s --port=%s %s %s %s' % (self.data['domain'], self.data['email'], self.data['user'], self.data['root_dir'], self.data['cgi_type'], self.data['ip'], debug_opt, self.data['port'], password, indexes, allow_override), 'sudo']]
return True