- Implemented FS#3308 - PATH placeholder in directive snippets (placeholder is named {DOCROOT}, like for nginx).
| | |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="apache_directives">{tmpl_var name='apache_directives_txt'}</label> |
| | | <textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea> <b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br> {tmpl_var name="apache_directive_snippets_txt"} |
| | | <textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea> <b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br> {tmpl_var name="apache_directive_snippets_txt"}<br>----<br><b> {tmpl_var name='variables_txt'}:</b> <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a> |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label> |
| | |
| | | // Make sure we only have Unix linebreaks |
| | | $vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']); |
| | | $vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']); |
| | | $trans = array('{DOCROOT}' => $vhost_data['web_document_root_www']); |
| | | $vhost_data['apache_directives'] = strtr($vhost_data['apache_directives'], $trans); |
| | | |
| | | // Check if a SSL cert exists |
| | | $ssl_dir = $data['new']['document_root'].'/ssl'; |