Friday, June 26, 2009

Digital force

沖slide $20
加mount $25

Saturday, June 20, 2009

virtual host behind squid reverse proxy

DocumentRoot /var/www/clients/server2/

allow from all
Options +Indexes

ProxyPass /
ProxyPassReverse /
#ProxyVia Off
#ProxyRequests Off
#ProxyPreserveHost On

Order allow,deny
allow from all

allow from all
Options +Indexes

Monday, June 15, 2009


Walter Lam 90175441/ 2626 0356
8/F, 117 Tong Po Blidg, 117 Tung Choi St, MK.

Saturday, June 13, 2009

iPhone programming syntax structure

The interface should looks as follows:

@interface NameOfClass : NameOfSuperclass
instance variables here...
class methods
instance methods

@interface SomeClass : NSObject
NSString *str;
NSDate *date;
int x;

// Getters
-(int) x;
-(NSString *) str;
-(NSDate *) date;

// Setters
-(void )setX:(int) input;
-(void) setStr:(NSString *)input;
-(void) setDate:(NSDate *)input;

// Other
-(void) printInstanceVars;
-(void) dealloc;

Thursday, June 11, 2009


Wednesday, June 10, 2009


大家好。我叫 곽준강。哈哈

點讀? 我都唔知 lol

Monday, June 8, 2009

phpMyAdmin 改 htaccess login

ubuntu 8 + apache2
sudo htpasswd /etc/phpmyadmin/htpasswd.setup admin

sudo nano /etc/phpmyadmin/apache.conf

Add under Directory tag:
AuthType Basic
AuthName "phpMyAdmin"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
Require valid-user

sudo /etc/init.d/apache2 restart

Friday, June 5, 2009

Reverse proxy 完成設置

Squid 2.7 + Ubuntu 8.10

One external IP, multiple web server
Only Squid server have to setup. All apache server works out of the box.

http_port 80 accel vhost
forwarded_for on

# default (IP)
cache_peer parent 80 0 no-query originserver name=ip login=PASS
acl defaultdomain dstdomain
cache_peer_access ip allow defaultdomain

cache_peer parent 80 0 no-query originserver name=server1 login=PASS
acl server1 dstdomain
cache_peer_access server1 allow server1

# server2
cache_peer parent 80 0 no-query originserver name=server2 login=PASS
acl server2 dstdomain
cache_peer_access server2 allow server2

# server3
cache_peer parent 80 0 no-query originserver name=server3 login=PASS
acl server3 dstdomain
cache_peer_access server3 allow server3

# grant access
http_access allow defaultdomain
http_access allow server1
http_access allow server2
http_access allow server3

# define server domain
cache_peer_domain ip # external IP
cache_peer_domain server1
cache_peer_domain server1
cache_peer_domain server2
cache_peer_domain server2
cache_peer_domain server3
cache_peer_domain server3