still showing default apache page after virtualhost has been added

apache is still showing the default install page after a new virtualhost has been added. why? because 000-default.conf is still set as the default. to remedy this issue a

a2dissite 000-default.conf

as root (or sudo if you must) then

service apache2 restart

that should, hopefully, be that.

subscribe!

you can now subscribe to cloudplasma.co.uk for instant activity updates! hello…? anyone…? no…? aww…

how to start and stop motion at a certain time

so here’s how to start the motion software controlling your webcam at a certain time and then have it stop at a certain time. this stops it recording when you know you’ll be in a place that’s monitored and you don’t want your drives getting filled with images of your activity.
do a crontab -e and then enter something like the following

40 5 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/start > /dev/null
30 19 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/pause > /dev/null

this will start the camera at 5:40 am and stop it again at 7:30 pm. n.b that this info was taken from the motion site…it’s a great resource but i’ve found it, sometimes, difficult to find what i need.

kirby cms post oops, not found

after writing a post using kirby cms i was getting an ‘oops, not found’ error when i clicked to read the whole post despite being able to see the preview on the main page. i think this had happened to me before but i’d forgotten all about it. the error was entirely my fault.
i name my posts like ’22-kirby_error_post’ but the latest one i created was more like ’22-kirby_error post’. note the lack of the underscore between ‘error’ and ‘post’. stupid mistake to make but at least it’s an easy one to remedy.

am enjoying using kirby. bit of a steep learning curve at first (at least it was for me) but it’s satisfying when you get good results.

motionpie ssh password error

recently setup motionpie and it’s working fine. was trying to access it via ssh but kept getting permission denied errors. you use your pi’s serial number for the password and root as the username… for example my pi’s serial is similar to mp-18dc77f1. entering that still gave me the permission denied error. the secret is to remove the mp- from the serial when you’re entering it so i gave it a 18dc77f1 and access was granted.

the pebble watch

great wee gadget and i’m very pleased with my purchase. it looks good. it shows you notifications from your android phone as well as displaying information from apps like runkeeper. you can customise the face and install various apps (like a compass or a notepad). it also unlocks my nexus 4 running lollipop when it’s near so that i don’t need to enter my PIN (new android feature called trusted devices). speaking of lollipop…i’d recommend you giving it a go if your device can run it. not a huge change from kitkat but there are many small things that add up to make it a pleasant OS to use.

pebble watch

owncloud 7 – Initial encryption running

after enabling encryption in owncloud 7 i was getting the error ‘Initial encryption running… Please try again later.’ when trying to log in. left this for a while as i assumed that it was just taking its time but a couple of hours later it was still doing the same thing and the server in question doesn’t house a lot of data at the moment.
the fix is relatively simple. open the oc_preferences table with your weapon of choice and have a look at the ‘files_encryption – migration_status row’ and if it’s currently at -1 change it to 1. save that and then try logging in to owncloud again. this worked for me (this is a combination of a couple of tips on the owncloud forums by the way).

ban IP addresses using ufw

install ufw with

apt-get install ufw

this’ll pull in some dependences too. note that nothing is blocked by default.
start ufw with

ufw enable

as root. block an IP with, for example

ufw deny from 80.179.91.***

and check it’s working with

ufw status verbose

which’ll output something like this

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
Anywhere                   DENY IN     80.179.91.***

root@box:/etc/apt# ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
Anywhere                   DENY IN     80.179.91.***

if you’ve done something wrong you can reset with

ufw reset

assuming you still have SSH access of course

Bear