Hero Image

IT setup examples

Invision forum lighttpd rewrite rules

$HTTP["host"] =~ "exampledomain.tld" {
server.document-root = "/var/www/replacedomain/public_html/"
server.error-handler-404 = "/index.php"
dir-listing.activate = "disable"
url.rewrite-final = (
"^/(sitemap.xml)" => "$0",
  "^/(.*).(.*)" => "$0",
  "^/(.*).(css|js|gif|jpg|png)$" => "$0",
   "^/(im...

Read more

23rd May 2019

Manually adding swap and activating on linux

Create swapfile

sudo install -o root -g root -m 0600 /dev/null /swapfile

Write out a 4GB file named ‘swapfile’

dd if=/dev/zero of=/swapfile bs=1k count=4096k

Let linux know about swap file

mkswap /swapfile

Activate swap

swapon /swapfile

activate swap also after boot. Add to the file

...

Read more

29th Apr 2019

SSH security best practice

SSH Security Best Practices

At file /etc/ssh/sshd_config:

Disable Root Logins

Best: PermitRootLogin no
Good: PermitRootLogin without-password

wihout-password requires "PubkeyAuthentication yes"

Limit user Logins

AllowUsers somusername1 someusername2

Disable Protocol 1

Protocol 2

U

...

Read more

14th Mar 2019