--set apache as proxy and let it listen on 80 and 443(https)
1. install apache2 httpd
download apache2.2 http://apache.mirror.rafal.ca/httpd/httpd-2.2.10.tar.gz
gzip -d httpd-2.2.10.tar.gz
tar -xvf httpd-2.2.10.tar
cd httpd-2.2.10
./configure --prefix=/opt/apache2 --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --enable-proxy --enable-rewrite --enable-ssl
make
./make
./make install
2.configure apache
http://www.onlamp.com/pub/a/onlamp/2008/03/04/step-by-step-configuring-ssl-under-apache.html
vi conf/httpd.conf
vi conf/extra/httpd-ssl.conf
3.create server key and certificate
openssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 \
-nodes -keyout server.key -out server.crt \
-subj '/O=RSNetSolution/OU=R&D/CN=rsnetsolution.homelinux.org'
4. now forward request
https://localhost/manual/mod/mod_proxy.html#proxy
ProxyRequests Off
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
ProxyPass /i http://localhost:2080/i
ProxyPassReverse /i http://localhost:2080/i
ProxyPass /apex http://localhost:2080/apex
ProxyPassReverse /apex http://localhost:2080/apex
ProxyPass /sys http://localhost:2080/sys
ProxyPassReverse /sys http://localhost:2080/sys
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order deny,allow
Deny from all
allow from localhost