Roxen.git
/
server
/
base_server
/
mainconfig.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/mainconfig.pike:1:
inherit "config/builders";
-
string cvs_version = "$Id: mainconfig.pike,v 1.
101
1998/04/09 15:
07
:
32
grubba Exp $";
+
string cvs_version = "$Id: mainconfig.pike,v 1.
102
1998/04/09 15:
18
:
40
grubba Exp $";
//inherit "roxenlib"; inherit "config/draw_things"; // import Array; // import Stdio; string status_row(object node); string display_tabular_header(object node); object get_template(string t);
Roxen.git/server/base_server/mainconfig.pike:221:
"Title":"Roxen Challenger maintenance", // "Expires":http_date(time(1)+2), // "Pragma":"no-cache", "Last-Modified":http_date(time(1)), ]) ]); } #define CONFIG_URL roxen->config_url()
+
// Holds the default ports for various protocols.
+
static private constant default_ports = ([
+
"ftp":21,
+
"http":80,
+
"https":443,
+
]);
+
mapping verify_changed_ports(object id, object o) { string res = default_head("Roxen Config: Setting Server URL") + ("<h1>Set the correct server URL</h1>" "As you have changed the open ports in one or more servers " "you might have to adjust the default server URL(s). Check the " "correct URL(s) below and modify it as needed. The server URLs are among " "other things used for redirects. " "<form action=\"/(modify_server_url)"+o->path(1)+"\">"); foreach(indices(changed_port_servers), object server)
Roxen.git/server/base_server/mainconfig.pike:271:
} foreach((glob ? GLOBVAR(ConfigPorts) : server->query("Ports")), array port) { string prt; if(port[1] == "tetris") continue; switch(port[1][0..2]) { case "ssl":
-
prt = "https
://
";
+
prt = "https";
break; case "ftp":
-
prt = "ftp
://
";
+
prt = "ftp";
break; default:
-
prt = port[1]
+"://"
;
+
prt = port[1];
}
-
if(port[2] && port[2]!="ANY")
+
int portno = default_ports[prt];
+
+
prt += "://";
+
if(port[2] && port[2]!="ANY")
{
prt += port[2];
-
+
} else {
#if efun(gethostname)
-
else
+
prt += (gethostname()/".")[0] + "." + (glob ? roxen->get_domain() : server->query("Domain"));
-
+
#else
+
prt += "localhost";
#endif
-
+
}
-
+
if (portno && (port[0] == portno)) {
+
// Default port.
+
prt += "/";
+
} else {
prt += ":"+port[0]+"/";
-
+
}
+
if(prt != def) res += sprintf(" <input type=radio name=\"%s\" value=\"%s\"> %s\n", name, prt, prt); } res += sprintf(" <input type=radio checked value=own name=\"%s\"> " "<input size=70 name=\"%s->own\" " "value=\"%s\">\n</pre><p>", name, name, def); }
Roxen.git/server/base_server/mainconfig.pike:1235:
" </font></td></tr></table></td>" "\n</tr>\n</table><br>"); } mapping logged = ([ ]); void check_login(object id) { if(logged[id->remoteaddr] + 1000 < time()) { report_notice("Administrator logged on from " +
-
roxen->blocking_ip_to_host(id->remoteaddr) + ".");
+
roxen->blocking_ip_to_host(id->remoteaddr) + ".
\n
");
} logged[id->remoteaddr] = time(1); } mapping configuration_parse(object id) { array (string) res=({}); string tmp; // Is it an image? if(sscanf(id->not_query, "/image/%s", tmp))