Revision 585100d2
Added by Frédéric Péters almost 13 years ago
| wcsinst/wcsinstd/deploy.py | ||
|---|---|---|
|
|
||
|
|
||
|
def make_apache_vhost(self):
|
||
|
pass
|
||
|
apache_vhost_template_path = os.path.join(self.skel_dir, 'apache-vhost.conf')
|
||
|
if not os.path.exists(apache_vhost_template_path):
|
||
|
return
|
||
|
apache_vhost_template = file(apache_vhost_template_path).read()
|
||
|
apache_dir = os.path.join(settings.MEDIA_ROOT, 'vhosts.d')
|
||
|
if not os.path.exists(apache_dir):
|
||
|
os.mkdir(apache_dir)
|
||
|
file(os.path.join(apache_dir, '%s.conf' % self.domain), 'w').write(
|
||
|
string.Template(apache_vhost_template).substitute({'domain': self.domain}))
|
||
|
|
||
|
|
||
|
def reload_apache(self):
|
||
Also available in: Unified diff
wcsinstd: generate apache vhost configuration file