]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Enabling HTTPS
authorWill Budicm <redacted>
Wed, 12 Aug 2020 03:19:13 +0000 (13:19 +1000)
committerWill Budicm <redacted>
Wed, 12 Aug 2020 03:19:13 +0000 (13:19 +1000)
Installation_LightHTTPD.txt [new file with mode: 0644]
lighttpd.conf

diff --git a/Installation_LightHTTPD.txt b/Installation_LightHTTPD.txt
new file mode 100644 (file)
index 0000000..1e851cc
--- /dev/null
@@ -0,0 +1,48 @@
+# Compile/Install LightHTTPD with SSL Support
+
+sudo apt install libssl-dev
+./configure --prefix=/usr/local/lighttpd --with-openssl --with-sqlite
+make
+sudo make install
+
+#check SSL enabled with:
+lighttpd -V
+
+## Create Selfsigned SSL Certificate
+
+openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
+  -keyout elite.key -out elite.crt -subj "/CN=elite.net" \
+  -addext "subjectAltName=DNS:elite.net,DNS:www.elite.net,IP:192.168.1.45"
+
+cat elite.key elite.crt > elite.net.pem
+
+## Setup virtual Host with SSL
+
+To set up Virtual Host with SSL, edit lighttpd config file /etc/lighttpd/lighttpd.conf with the following values.
+
+#Add "mod_openssl" to server module list.
+server.modules   = ( "mod_access",
+                     "mod_setenv", 
+                     ...
+                     "mod_openssl"
+)
+
+$SERVER[“socket”] == “:443” {
+
+ssl.engine = “enable”
+ssl.pemfile = “/etc/lighttpd/ssl/elite.net.pem”
+
+# ssl.ca-file = “/etc/lighttpd/ssl/CA_issuing.crt”
+
+server.name = “elite.net”
+server.document-root = “/sites/vhosts/elite.net/public”
+server.errorlog = “/var/log/lighttpd/elite.net.error.log”
+accesslog.filename = “/var/log/lighttpd/elite.net.access.log”
+
+}
+
+## Start "lighty" with -D option for interactive console trouble shooting and testing.
+
+lighttpd -D -f  ~/dev/LifeLog/lighttpd.conf
+
index dcb8225fb441adb51f8830a8cec0431dc299cd71..a117e4a961683c0f14e725119e3fd852e8f8cee3 100644 (file)
@@ -1,4 +1,4 @@
-server.document-root = "/home/will/dev/lighttpd/LifeLog/htdocs
+server.document-root = "/home/will/dev/LifeLog/htdocs/cgi-bin
 
 server.port = 3000