apache2 reverse proxy

Panduan singkat sebagai pengingat untuk memanfaatkan apache2 sebagai reverse proxy.

tambahkan modul proxy, dan proxy_http

a2enmod proxy
a2enmod proxy_http

restart apache
apache2ctl restart

edit virtualhost (/etc/apache2/sites-available/default.conf)
<VirtualHost *:80>
ServerAdmin nobody@no.com
ServerName pdf.domain.com
DocumentRoot /var/www/pdf/controller
ErrorLog /var/log/apache2/pdf-error.log
CustomLog /var/log/apache2/pdf-access.log common
<Directory /var/www/pdf/controller>
Allow From All
</Directory>
ProxyRequests Off
ProxyPreserveHost On
# <Proxy *>
# Order deny,allow
# Allow from all
# </Proxy>
ProxyPass / http://10.0.1.91:80/pdf/controller/
ProxyPassReverse / http://10.0.1.91:80/pdf/controller/
</VirtualHost>

reload konfigurasi apache

#apache2ctl graceful

Iklan

2 thoughts on “apache2 reverse proxy

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s