Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

make https port setting changeable via front end somewhere (chosen Http Networking page /Settings_p.html?page=http )

regerc3e40c82fe80
diff --git a/htroot/SettingsAck_p.html b/htroot/SettingsAck_p.html
index decaf3fea..0b4464890 100644
--- a/htroot/SettingsAck_p.html
+++ b/htroot/SettingsAck_p.html
@@ -183,6 +183,10 @@
<p class="error">Invalid maximum file size for http crawler: <tt>#[crawler.http.maxFileSize]#</tt></p>
::<!-- 31: Cralwer settings, maxFtpFileSize error -->
<p class="error">Invalid maximum file size for ftp crawler: <tt>#[crawler.http.maxFileSize]#</tt></p>
+ ::<!-- 32: https port setting changed -->
+ <p>HTTPS port is now: <span class="settingsValue">#[port.ssl]#</span></p>
+ <p>the change will take effect after restart.</p>
+ <p>Note: the SSL option must be switched on, see <a href="ConfigBasic.html">Basic Configuration</a></p>
#(/info)#
<p>You can now go back to the <a href="#[referer]#">Settings</a> page if you want to make more changes.</p>
#%env/templates/footer.template%#
diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java
index 6219a6e8b..2ebbcef94 100644
--- a/htroot/SettingsAck_p.java
+++ b/htroot/SettingsAck_p.java
@@ -503,6 +503,16 @@ public class SettingsAck_p {
return prop;
}
+ // change https port
+ if (post.containsKey("port.ssl")) {
+ int port = post.getInt("port.ssl", 8443);
+ if (port > 0 && port != env.getConfigInt("port", 8090)) {
+ env.setConfig("port.ssl", port);
+ }
+ prop.put("info_port.ssl", port);
+ prop.put("info", "32");
+ return prop;
+ }
// nothing made
prop.put("info", "1");//no information submitted
diff --git a/htroot/Settings_Http.inc b/htroot/Settings_Http.inc
index 909e367b9..f61859b55 100644
--- a/htroot/Settings_Http.inc
+++ b/htroot/Settings_Http.inc
@@ -24,12 +24,12 @@
<td>Specifies if the proxy should send the X-Forwarded-For http header.</td>
</tr>
<tr valign="top">
- <td colspan="3"><input type="submit" name="httpNetworking" value="Submit" /> <em>Changes will take effect immediately.</em></td>
+ <td colspan="3"><input type="submit" class="btn-primary btn-sm" name="httpNetworking" value="Submit" /> <em>Changes will take effect immediately.</em></td>
</tr>
</table>
</fieldset>
</form><br />
-<form>
+<form action="SettingsAck_p.html">
<fieldset><legend id="httpserver">HTTP Server</legend>
<table border="0" cellspacing="5">
<tr>
@@ -37,9 +37,15 @@
<td><b>#[httpservername]#</b></td>
</tr>
<tr>
- <td>HTTP Server Port:</td>
+ <td><a href="ConfigBasic.html">HTTP Server Port</a>:</td>
<td><b>#[port]#</b></td>
</tr>
+ #(server.https)#::
+ <tr>
+ <td>HTTPS Port:</td>
+ <td><input type="text" width="4" name="port.ssl" value="#[port.ssl]#" size="4" maxlength="6"/>&nbsp;<input class="btn-primary btn-xs" type="submit" value="change"/></td>
+ </tr>
+ #(/server.https)#
</table>
</fieldset>
</form><br />
\ No newline at end of file
diff --git a/htroot/Settings_p.java b/htroot/Settings_p.java
index a96468dea..d2a796c25 100644
--- a/htroot/Settings_p.java
+++ b/htroot/Settings_p.java
@@ -184,8 +184,11 @@ public final class Settings_p {
prop.putHTML("crawler.ftp.maxFileSize",sb.getConfig("crawler.ftp.maxFileSize", "-1"));
prop.putHTML("crawler.smb.maxFileSize",sb.getConfig("crawler.smb.maxFileSize", "-1"));
prop.putHTML("crawler.file.maxFileSize",sb.getConfig("crawler.file.maxFileSize", "-1"));
-
+
+ // http server info
prop.put("httpservername",sb.getHttpServer().getVersion());
+ prop.put("server.https",sb.getConfigBool("server.https", false));
+ prop.put("server.https_port.ssl", sb.getConfig("port.ssl","8443"));
// return rewrite properties
return prop;