Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial Commit

  • Loading branch information...
commit ec7473134e3cd12765bc26f55787a11339871bb6 0 parents
@Scyllinice Scyllinice authored
0  .~ko-5.1.1-perllint~
No changes.
0  README.rdoc
No changes.
1  config.info
@@ -0,0 +1 @@
+root=Path to Nginx Root,0
31 index.cgi
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+use File::Find;
+
+require 'nginx-lib.pl';
+ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
+
+@tabs = (['global', 'Global Configuration'], ['existing', 'Existing Virtual Hosts'], ['create', 'Create Virtual Host']);
+
+print ui_tabs_start(\@tabs, 'mode', 'existing');
+
+print ui_tabs_start_tab('mode', 'global');
+ do 'views/global-settings.pl';
+print &ui_form_end([ [ "save", $text{'save'} ] ]);
+
+print ui_tabs_end_tab('mode', 'global');
+
+print ui_tabs_start_tab('mode', 'existing');
+ do 'views/existing-hosts.pl';
+print ui_tabs_end_tab('mode', 'existing');
+
+print ui_tabs_start_tab('mode', 'create');
+ do 'views/create-hosts.pl';
+print ui_tabs_end_tab('mode', 'create');
+
+print ui_tabs_end();
+
+
+
+
+ui_print_footer("/", $text{'index'});
2  lang/en
@@ -0,0 +1,2 @@
+index_title=Nginx Web Server
+index_root=The root directory is $1.
4 module.info
@@ -0,0 +1,4 @@
+desc=Nginx Webserver
+version=0.01
+os_support=*-linux
+category=servers
21 nginx-lib.pl
@@ -0,0 +1,21 @@
+BEGIN { push(@INC, ".."); };
+use WebminCore;
+init_config();
+
+sub get_nginx_config
+{
+
+ my $lref = &read_file_lines($module_config_file);
+ my @rv;
+ my $lnum = 0;
+ foreach my $line (@$lref) {
+ my ($n, $v) = split(/\s+/, $line, 2);
+ if ($n) {
+ push(@rv, { 'name' => $n, 'value' => $v, 'line' => $lnum });
+ }
+ $lnum++;
+ }
+ return @rv;
+
+
+}
0  views/create-hosts.pl
No changes.
0  views/existing-hosts.pl
No changes.
10 views/global-settings.pl
@@ -0,0 +1,10 @@
+ use File::Find;
+
+ print "<select name=\"file\">";
+ my $pattern = 'conf';
+ find sub {print "<option>". $File::Find::name . "</option>\n" if /$pattern/}, "/etc/apache2";
+ print "</select>";
+print &ui_form_start("allmanual_save.cgi", "form-data");
+$data = &read_file_contents($config{'root'} . "/conf/nginx.conf");
+print &ui_textarea("data", $data, 20, 80, undef, undef,
+ "style='width:100%'"),"<br>\n";
111 virtual_feature.pl
@@ -0,0 +1,111 @@
+do 'virtualmin-nginx-lib.pl';
+
+sub feature_always_links
+{
+
+}
+
+sub feature_backup
+{
+
+}
+
+sub feature_bandwidth
+{
+
+}
+
+sub feature_check
+{
+ return undef;
+}
+
+sub feature_clash
+{
+ return undef;
+}
+
+sub feature_delete
+{
+ my ($d) = @_;
+ &$virtual_server::first_print("Deleting Nginx Site...");
+
+}
+
+sub feature_depends
+{
+ return undef;
+}
+
+sub feature_disable
+{
+
+}
+
+sub feature_disname
+{
+
+}
+
+sub feature_enable
+{
+
+}
+
+sub feature_import
+{
+
+}
+
+sub feature_label
+{
+
+}
+
+sub feature_links
+{
+
+}
+
+sub feature_losing
+{
+
+}
+
+sub feature_modify
+{
+ my ($d, $oldd) = @_;
+ if ($d->{'dom'} ne $oldd->{'dom'}) {
+ }
+}
+
+sub feature_name
+{
+ return "Nginx";
+}
+
+sub feature_restore
+{
+
+}
+
+sub feature_setup
+{
+ my ($d) = @_;
+ &$virtual_server::first_print("Setting up Nginx Site...");
+}
+
+sub feature_suitable
+{
+ return 1;
+}
+
+sub feature_validate
+{
+ return undef;
+}
+
+sub feature_webmin
+{
+
+}
4 virtualmin-nginx-lib.pl
@@ -0,0 +1,4 @@
+use WebminCore;
+&init_config();
+&foreign_require("virtual-server", "virtual-server-lib.pl");
+1;
Please sign in to comment.
Something went wrong with that request. Please try again.