Jun 29, 2013

Codeigniter on Alternate Port

Rather than using sub path, I deploy my web on alternate port. But this is also not normally supported in Codeigniter. So here's how I do it.

Add this in /.htaccess:
RewriteCond %{SERVER_NAME} localhost
RewriteCond %{SERVER_PORT} 80
RewriteRule ^%{SERVER_NAME} %{SERVER_NAME}:8000?/$1 [R,NC]

And this as site name:

Now it works just as on real domain and real port, http port 80 that is.

Jun 15, 2013

SSH Login Without Password

I forgot to put a section about login to an ssh account without password for my previous entry about VNC Gateway. The VNC scripts should have been working without password entry. Here is how to do it.

First, make a public key for local account, just follow the simple instructions:

$ ssh-keygen

Then add the public key to remote account list of authorized accounts:

$ cat ~/.ssh/id_rsa.pub | ssh remote_user@remote_system 'cat >> ~/.ssh/authorized_keys'

Now try to login using ssh, it should not ask for password anymore:

$ ssh remote_user@remote_system

Cordova WebSQL Path

The SQLite database file for Cordova WebSQL resides in: /data/data/<app.package.name>/app_webview/databases/file__0/1