APACHE PROXYPASS
Practical
<SERVER>
1)
Go to configuration file and in VH Section add “Redirect” directive:
#
vim /etc/httpd/conf/httpd.conf
<VirtualHost
192.168.0.102:80>
ServerAdmin
webmaster@dummy-host.example.com
DocumentRoot
/opt/website_directory1
ServerName
first.com
ProxyPass
/ http://third.com
ProxyPassReverse
/ http://third.com
DirectoryIndex
index.php
ErrorLog
logs/dummy-host.example.com-error_log
CustomLog
logs/dummy-host.example.com-access_log common
</VirtualHost>
2) Reload the “httpd” service.
#
/etc/init.d/httpd reload
<CLIENT>
1)
Go to client i.e. Base Machine and open browser, type there
http://first.com
(In
browser you can see address of “first.com” but page of “third.com”)
Apache REDIRECT v/s Apache PROXYPASS
APACHE
REDIRECT |
APACHE
PROXYPASS |
1. Not Secure. |
1. Secure. |
2. Client knows the
“Redirected page”. |
2. Client doesn’t
know the “Redirected page”. |
3. No additional
directive used. |
3.
“ProxyPassReverse” used. |
Comments
Post a Comment