- Ubuntu 20.04 (18.04, 16.04 works the same)
- Apache 2.4.18 or higher
- OpenSSL 1.0.2g-1ubuntu4.10 or higher
- e.g. LetsEncrypt certificate
OS: Ubuntu 20.04 Apache/2.4.18 1.0.2g-1ubuntu4.10 +
I took it from here, but becasue of newer MySQL it needs to be updated a bit.
Based on https://techwombat.com/enable-http2-apache-ubuntu-16-04/
This totorial is for an older Ubuntu 16.04, for a Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831 and for a Ubuntu 20.04 please read here* --> https://gist.github.com/GAS85/38eb5954a27d64ae9ac17d01bfe9898c
MOVED TO https://github.com/GAS85/cubietruck
I create a script that will try to send Warning Email and and shutdown the system as soon as it goes below 10%.
I put it in cron hourly and script should automatically check and do loop if battery discharging and below e.g. 80%.
E-Mail is needed because last time I did not know that my power supply died and I did not know why sever stopped. This version is also producing logs that could be checked after cubietruck fails. That helps for trouble shooting, e.g. to find out that power supply could not produce enough current to charge battery.
Log output example:
As per https://www.htpcguides.com/force-torrent-traffic-vpn-split-tunnel-debian-8-ubuntu-16-04/, but with few upgrades.
Everything in one script: https://github.com/GAS85/pia/blob/master/split_tunnel_VPN.sh
Just added this into Apache2 config. E.g. /etc/apache2/sites-available/900-restrictDirectIP.conf and enable it afterwards.
<VirtualHost 192.168.0.1:80>
ServerName 192.168.0.1
Redirect 403 /
ErrorDocument 403 "Sorry, direct IP access not allowed."
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error_directIPAccess.log
CustomLog ${APACHE_LOG_DIR}/access_directIPAccess.log combined
Source: https://lilleengen.io/blog/index.php/posts/activating-http-public-key-pinning-hpkp-on-lets-encrypt
Since the letsencrypt seems to create a new private key every time the certificate is renewed and Let's Encrypt requires you to renew you certificate once every ~80 days pinning using your certificate's SPKI is probably not the way to go. So, what should we pin then? Let's Encrypt is currently issuing from Authority X3, and using Authority X4 as a backup, so these two is a great place to start. We should also include the ISRG Root so this might support new Authorities with other SPKIs as well.
To generate the hash of the SPKI of these certificates run the following commands