Fixes in proxy virtualhost
This commit is contained in:
parent
b2b879c3f8
commit
d3d041f569
9 changed files with 84 additions and 21 deletions
|
|
@ -69,21 +69,25 @@ if args.path:
|
|||
if path=='':
|
||||
path='/'
|
||||
|
||||
apache_path='/proxy'
|
||||
|
||||
if path=='/':
|
||||
|
||||
name='proxy'
|
||||
|
||||
base_name_file='{}-001-{}.conf'.format(args.domain, name)
|
||||
#base_name_file='{}-{}.conf'.format(args.domain, name)
|
||||
|
||||
name_file='/home/{}/{}-001-{}.conf'.format(system_user, args.domain, name)
|
||||
#name_file='/home/{}/{}-{}.conf'.format(system_user, args.domain, name)
|
||||
|
||||
else:
|
||||
|
||||
apache_path=''
|
||||
|
||||
name=os.path.basename(home_user[:-1]).strip()
|
||||
|
||||
base_name_file='{}-000-{}.conf'.format(args.domain, name)
|
||||
|
||||
name_file='/home/{}/{}-000-{}.conf'.format(system_user, args.domain, name)
|
||||
base_name_file='{}-{}.conf'.format(args.domain, name)
|
||||
|
||||
name_file='/home/{}/{}-{}.conf'.format(system_user, args.domain, name)
|
||||
|
||||
with open(name_file, 'w') as f:
|
||||
|
||||
|
|
@ -126,7 +130,7 @@ with open(name_file, 'w') as f:
|
|||
|
||||
print('Updating apache configuration for application outside of htdocs...')
|
||||
|
||||
if subprocess.call('sudo mv {} /etc/{}/vhosts.d/extra && sudo chown root:root /etc/{}/vhosts.d/extra/{}'.format(name_file, apache_cmd, apache_cmd, base_name_file), shell=True) > 0:
|
||||
if subprocess.call('sudo mv {} /etc/{}/vhosts.d/extra{} && sudo chown root:root /etc/{}/vhosts.d/extra{}/{}'.format(name_file, apache_cmd, apache_path, apache_cmd, apache_path, base_name_file), shell=True) > 0:
|
||||
print('Error')
|
||||
sys.exit(1)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue