Skip to content

Commit

Permalink
Merge pull request #28 from Tuurlijk/master
Browse files Browse the repository at this point in the history
Support top-level resolving of __DOCUMENT_ROOT__
  • Loading branch information
cytopia authored Jul 17, 2018
2 parents 2a4d943 + f05006b commit d08ce5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/vhost_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ def get_vhost_plain(config, tpl, docroot, proxy, location, server_name, default)
return str_replace(tpl['vhost'], {
'__PORT__': vhost_get_port(config, False),
'__DEFAULT_VHOST__': vhost_get_default_server(config, default),
'__DOCUMENT_ROOT__': vhost_get_docroot_path(config, docroot),
'__VHOST_NAME__': vhost_get_server_name(config, server_name, default),
'__VHOST_DOCROOT__': str_indent(vhost_get_vhost_docroot(config, tpl, docroot, proxy), 4),
'__VHOST_RPROXY__': str_indent(vhost_get_vhost_rproxy(tpl, proxy, location), 4),
Expand All @@ -667,6 +668,7 @@ def get_vhost_ssl(config, tpl, docroot, proxy, location, server_name, default):
return str_replace(tpl['vhost'], {
'__PORT__': vhost_get_port(config, True),
'__DEFAULT_VHOST__': vhost_get_default_server(config, default),
'__DOCUMENT_ROOT__': vhost_get_docroot_path(config, docroot),
'__VHOST_NAME__': vhost_get_server_name(config, server_name, default),
'__VHOST_DOCROOT__': str_indent(vhost_get_vhost_docroot(config, tpl, docroot, proxy), 4),
'__VHOST_RPROXY__': str_indent(vhost_get_vhost_rproxy(tpl, proxy, location), 4),
Expand All @@ -688,6 +690,7 @@ def get_vhost_redir(config, tpl, server_name, default):
return str_replace(tpl['vhost'], {
'__PORT__': vhost_get_port(config, False),
'__DEFAULT_VHOST__': vhost_get_default_server(config, default),
'__DOCUMENT_ROOT__': vhost_get_docroot_path(config, docroot),
'__VHOST_NAME__': vhost_get_server_name(config, server_name, default),
'__VHOST_DOCROOT__': '',
'__VHOST_RPROXY__': '',
Expand Down

0 comments on commit d08ce5a

Please sign in to comment.