This took me days to figure out. I am happy to share with you guys who are wondering how to setup a reverse proxy.
<VirtualHost *:8081>
ServerName my-server
DocumentRoot /var/www/html/my-app
RewriteEngine On
<Directory /var/www/html/my-app/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://{internal-app-server-ip}/
ProxyPassReverse / http://{internal-app-server-ip}/
</VirtualHost>
Save it and restart apache service.
When you access http://my-server:8081 in a browser apache will interpret the configuration above and redirects the url to http://{internal-app-server-ip}/ - internally while preserving the originating url in your browser which is http://my-server:8081.
Subscribe to:
Post Comments (Atom)
APACHE - failed to start
[On] Red Hat Enterprise Linux Server release 7.4 (Maipo) Apache was not running and attempt to start the httpd service failed. The natural t...
-
[Tested On] CentOS Linux release 7.4.1708 (Core) # wget https://ftp.postgresql.org/pub/source/v9.6.6/postgresql-9.6.6.tar.gz # tar xvzf post...
-
[Tested On] Red Hat Enterprise Linux Server release 7.4 (Maipo) Note: For Windows Server, please make sure telnet client is installed. # tel...
-
# openssl s_client -connect localhost:443
No comments:
Post a Comment