- guna kalau kita nak buat "multiple web server" dalam satu "IP"
macam kes aku, aku pakai banyak domain/sub-domain dalam satu IP.
so, sekarang tambah pulak lagi satu Sub-domain.
sub-domain nih pulak akan guna web server lain.
jadi, misi mencari pun bermula
cari punya cari punya cari, jumpa la solution dia..
nih link dia:
http://www.integratedwebsystems.com/2010/06/multiple-web-servers-over-a-single-ip-using-apache-as-a-reverse-proxy/
tapi, bila aku ikut, tak berapa menjadi.
dalam "host" error message keluar
[warn] proxy: No protocol handler was valid for the URL /favicon.ico. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
process mencari bersambung sekali. then terjumpa la solution dia.So, dalam httpd.conf kena load:
1) LoadModule proxy_module modules/mod_proxy.so
2) LoadModule proxy_http_module modules/mod_proxy_http.so
so, semua dah berjalan.. Alhamdulillah.
Contoh setting virtual host dalam "main web server"
dalam target web server, setting ikut keserasian. hehehehehe<VirtualHost *:80>
ServerName dummy.host.com
ServerAdmin admin@host.com
ProxyPreserveHost on
ProxyPass / http://192.168.1.134/
ProxyPassReverse / http://192.168.1.134/
ErrorLog "D:/ApacheWebData/logs/mpb-vhost-error.log"
CustomLog "D:/ApacheWebData/logs/mpb-vhost-access.log" common
</VirtualHost>
rujukan lain
- http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
- http://httpd.apache.org/docs/2.2/vhosts/examples.html
No comments:
Post a Comment