To edit the default file you should change the file permission
The code will be
sudo chmod 777 /etc/apache2/sites-available/default
You need to add these two lines in the default file and the line should not be in the outside of
<VirtualHost>................</VirtualHost>
ProxyPass /path http://www.google.com/
ProxyPassReverse /path http://www.google.com/
after that you should do enable the proxy and proxy_http. The command will be like that
sudo a2enmod proxy
sudo a2enmod proxy_http
Atlast, you should reload the apache server
sudo /etc/init.d/apache2 reload
The paste the url in the browser :
localhost/path
It will redirect you in google.com site
No comments:
Post a Comment