Reverse proxy apache for couchpotato sickrage transmission sabnzbd

First enable the proxy modules in Apache:

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo nano /etc/apache2/site-available/000-default.conf

add:

<Location /sabnzbd>
ProxyPass http://127.0.0.1:8080/sabnzbd
ProxyPassReverse http://127.0.0.1/sabnzbd
</Location>

<Location /couchpotato>
ProxyPass http://127.0.0.1:5050/couchpotato
ProxyPassReverse http://127.0.0.1:5050/couchpotato
</Location>

<Location "/sickrage">
ProxyPass http://127.0.0.1:8081/sickrage
ProxyPassReverse http://127.0.0.1:8081/sickrage
</Location>

<Location "/transmission">
ProxyPass http://127.0.0.1:9091/transmission
ProxyPassReverse http://127.0.0.1:9091/transmission
</Location>

Ctrl+X, Y and Enter to save and exit

sudo service apache2 restart

Couchpotato:

sudo /etc/init.d/couchpotato stop
cd ~/.couchpotato
nano config.ini

change:

[global]
...
...
urlbase = couchpotato

Ctrl+X, Y and Enter to save and exit

sudo /etc/init.d/couchpotato start

Sickrage:

sudo /etc/init.d/sickrage stop
nano /opt/sickrage/config.ini

 

change:

web_root = "/sickrage"
...
handle_reverse_proxy = 1

Ctrl+X, Y and Enter to save and exit

sudo /etc/init.d/sickrage start

Transmission:

sudo /etc/init.d/transmission-deamon stop
sudo nano /etc/transmission-deamon/settings.json

change:

"blocklist-url": "http://john.bitsurge.net/public/biglist.p2p.gz",
...
"rpc-authentication-required": true,
...
"rpc-password": "something",
...
"rpc-url": "/transmission/",
...
"rpc-username": "username",
...
"rpc-whitelist-enabled": false,

Ctrl+X, Y and Enter to save and exit

sudo /etc/init.d/transmission-deamon start

Sabnzbd:

None 🙂

How to make a programm continue to run after log out from ssh

Assuming that you have a program running in the foreground, press ctrl-Z, then:

[1]+  Stopped                 myprogram
$ disown -h %1
$ bg 1
[1]+ myprogram &
$ logout

If there is only one job, then you don’t need to specify the job number. Just use disown -h and bg.

Explanation of the above steps:

You press ctrl-Z. The system suspends the running program, displays a job number and a “Stopped” message and returns you to a bash prompt.

You type the disown -h %1 command (here, I’ve used a 1, but you’d use the job number that was displayed in the Stopped message) which marks the job so it ignores the SIGHUP signal (it will not be stopped by logging out).

Next, type the bg command using the same job number; this resumes the running of the program in the background and a message is displayed confirming that.

You can now log out and it will continue running..

source:
http://stackoverflow.com/questions/954302/how-to-make-a-programme-continue-to-run-after-log-out-from-ssh

Convert m4a to mp3 with subdirectories

Dependencies:

Codecs: @ sudo apt-get install ubunturestrictedextras

Lame: @ sudo apt-get install lame

Faad: @ sudo apt-get install faad

Script:

@ nano m4atomp3

#!/bin/bash
mf=$@
faad -q -o – “$mf” |
lame –vbr-new -V 2 – “${mf%.m4a}.mp3”

@ chmod +x m4atomp3

@ find -name “*.m4a” -exec ./m4atomp3 {} \;

source:
http://giantdorks.org/alain/a-few-methods-to-convert-aac-m4a-to-mp3-under-linux/
https://workingninja.com/blog/convert-m4a-mp3

 

Move everything one directory up

The only right way to move (mv) in linux:

De enige juiste manier om alle bestanden een map lager te verplaatsen,
van /folder1/folder2 naar /folder1:

sudo su
cd /folder1/folder2
shopt -s dotglob
mv — * ..
shopt -u dotglob

source/bron: http://superuser.com/questions/62141/how-to-move-all-files-from-current-directory-to-upper-directory

Howto – Ubuntu server

Interface instellen op statisch
http://www.jansipke.nl/ubuntu-12-04-network-configuration/

Install Webmin

How to install webmin on ubuntu 11.04 (Natty) server

Install fail2ban
https://help.ubuntu.com/community/Fail2banExtra for fail2ban and webmin

Extra for fail2ban and webmin

Do you use Webmin to configure iptables and also run fail2ban? Don’t forget to do this!

Install Logwatch
https://help.ubuntu.com/community/Logwatch

Hardening PHP5

Hardening PHP on Ubuntu with Suhosin patches

(chmod help: http://catcode.com/teachmod/try_1.html)

phpmyadmin
apt-get install phpmyadmin