summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/.gitignore4
-rw-r--r--MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.cmd11
-rw-r--r--MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.sh10
3 files changed, 25 insertions, 0 deletions
diff --git a/MCServer/.gitignore b/MCServer/.gitignore
index 32a634a03..6da9aa7c7 100644
--- a/MCServer/.gitignore
+++ b/MCServer/.gitignore
@@ -30,3 +30,7 @@ motd.txt
*.xml
mcserver_api.lua
+# Ignore the webadmin certs / privkey, so that no-one commits theirs by accident:
+webadmin/httpscert.crt
+webadmin/httpskey.pem
+
diff --git a/MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.cmd b/MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.cmd
new file mode 100644
index 000000000..661cc34e8
--- /dev/null
+++ b/MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.cmd
@@ -0,0 +1,11 @@
+echo This script generates the certificate and private key for the https webadmin
+echo Note that the generated certificate is self-signed, and therefore not trusted by browsers
+echo Note that this script requires openssl to be installed and in PATH
+echo.
+echo When OpenSSL asks you for Common Name, you need to enter the fully qualified domain name of the server, that is, e. g. gallery.xoft.cz
+echo.
+echo If OpenSSL fails with an error, "WARNING: can't open config file: /usr/local/ssl/openssl.cnf", you need to run this script as an administrator
+echo.
+
+openssl req -x509 -newkey rsa:2048 -keyout httpskey.pem -out httpscert.crt -days 3650 -nodes
+pause \ No newline at end of file
diff --git a/MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.sh b/MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.sh
new file mode 100644
index 000000000..0c8594f1a
--- /dev/null
+++ b/MCServer/webadmin/GenerateSelfSignedHTTPSCertUsingOpenssl.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+echo "This script generates the certificate and private key for the https webadmin"
+echo "Note that the generated certificate is self-signed, and therefore not trusted by browsers"
+echo "Note that this script requires openssl to be installed and in PATH"
+echo ""
+echo "When OpenSSL asks you for Common Name, you need to enter the fully qualified domain name of the server, that is, e. g. gallery.xoft.cz"
+echo ""
+
+openssl req -x509 -newkey rsa:2048 -keyout httpskey.pem -out httpscert.pem -days 3650 -nodes \ No newline at end of file