- nginx: added {DOCROOT} and {FASTCGIPASS} placeholders to directive snippets and nginx Directives fields.
| | |
| | | $wb['active_txt'] = 'Aktiv'; |
| | | $wb['directive_snippets_name_empty'] = 'Bitte geben Sie einen Namen für den Schnipsel an.'; |
| | | $wb['directive_snippets_name_error_unique'] = 'Es existiert schon ein Direktiven-Schnipsel mit diesem Namen.'; |
| | | $wb['variables_txt'] = 'Variablen'; |
| | | ?> |
| | |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["directive_snippets_name_empty"] = 'Please specify a name for the snippet.'; |
| | | $wb["directive_snippets_name_error_unique"] = 'There is already a directive snippet with this name.'; |
| | | $wb['variables_txt'] = 'Variables'; |
| | | ?> |
| | |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="snippet">{tmpl_var name='snippet_txt'}</label> |
| | | <textarea name="snippet" id="snippet" rows='10' cols='50' style="width:400px;">{tmpl_var name='snippet'}</textarea> |
| | | <textarea name="snippet" id="snippet" rows='10' cols='50' style="width:400px;">{tmpl_var name='snippet'}</textarea><div class="nginx"> {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_txt'}</p> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script language="JavaScript" type="text/javascript"> |
| | | |
| | | if(jQuery('#type').val() == 'nginx'){ |
| | | jQuery('.nginx:hidden').show(); |
| | | } else { |
| | | jQuery('.nginx:visible').hide(); |
| | | } |
| | | |
| | | jQuery('#type').change(function(){ |
| | | if(jQuery(this).val() == 'nginx'){ |
| | | jQuery('.nginx:hidden').show(); |
| | | } else { |
| | | jQuery('.nginx:visible').hide(); |
| | | } |
| | | }); |
| | | |
| | | </script> |
| | |
| | | $wb['invalid_rewrite_rules_txt'] = 'Unzulässige Rewrite Rules'; |
| | | $wb['allowed_rewrite_rule_directives_txt'] = 'Erlaubte Direktiven:'; |
| | | $wb['configuration_error_txt'] = 'KONFIGURATIONSFEHLER'; |
| | | $wb['variables_txt'] = 'Variablen'; |
| | | ?> |
| | |
| | | $wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules'; |
| | | $wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:'; |
| | | $wb['configuration_error_txt'] = "CONFIGURATION ERROR"; |
| | | $wb['variables_txt'] = 'Variables'; |
| | | ?> |
| | |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label> |
| | | <textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea> <b>{tmpl_var name="available_nginx_directive_snippets_txt"}</b><br><br> {tmpl_var name="nginx_directive_snippets_txt"} |
| | | <textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea> <b>{tmpl_var name="available_nginx_directive_snippets_txt"}</b><br><br> {tmpl_var name="nginx_directive_snippets_txt"}<br>----<br><b> {tmpl_var name='variables_txt'}:</b> <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a> |
| | | </div> |
| | | <div class="ctrlHolder proxy"> |
| | | <label for="proxy_directives">{tmpl_var name='proxy_directives_txt'}</label> |
| | |
| | | $nginx_directives = str_replace("\r", "\n", $nginx_directives); |
| | | $nginx_directive_lines = explode("\n", $nginx_directives); |
| | | if(is_array($nginx_directive_lines) && !empty($nginx_directive_lines)){ |
| | | $trans = array('{DOCROOT}' => $vhost_data['web_document_root_www'], '{FASTCGIPASS}' => 'fastcgi_pass '.($data['new']['php_fpm_use_socket'] == 'y'? 'unix:'.$fpm_socket : '127.0.0.1:'.$vhost_data['fpm_port']).';'); |
| | | foreach($nginx_directive_lines as $nginx_directive_line){ |
| | | $final_nginx_directives[] = array('nginx_directive' => $nginx_directive_line); |
| | | $final_nginx_directives[] = array('nginx_directive' => strtr($nginx_directive_line, $trans)); |
| | | } |
| | | } |
| | | $tpl->setLoop('nginx_directives', $final_nginx_directives); |