Thoughts and tutorials on programming
Wednesday, August 05, 2009
how to compile ruby with increased garbage size
Monday, August 03, 2009
how to proxy to a port when your firewall blocks that port [using mod_proxy instead]
For me, it was getting some external server to forward all requests on to that port.
I realize you can use ssh -Rport:host:port as well (through some other server), however ssh tunnelling was at times interrupted and didn't have a retry or restart, it seemed, at least that I knew of.
Anyway the final forward was:
1) create new subdomain that will forward it on.
2) edit apache's conf [apache.conf in my example] to forward things on
Order deny,allow
Allow from all
ServerName audio-mp3.ibiblio.org.8000.doachristianturndaily.info
ProxyPass / http://audio-mp3.ibiblio.org:8000/
3) install forwarders:
sudo a2enmod proxy
sudo a2enmod proxy_http
4) restart apache
5) enjoy the tunes [in my case].
Saturday, August 01, 2009
how to setup a remote git repository using ssh
$ ssh myserver.com
Welcome to myserver.com!
$ mkdir /var/git/myapp.git && cd /var/git/myapp.git
$ git --bare init
Initialized empty Git repository in /var/git/myapp.git
$ exit
Bye!
Add the remote repository to your existing local git repo and push:
$ cd ~/Sites
$ mkdir myapp
$ git init
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ touch README
$ git add README
$ git commit -m "initial commit"
$ git push origin master