Reverse Proxy Apache

Neat trick after subdomain is created, want to preserve the url for example lets look at this lab hack (its been edited to not reveal actual address, but it certainly works)

#Reverse Proxy in Apache Syntax

<VirtualHost *:80>
    ServerAdmin kewrunner@gmail.com
    ServerName subdomain.example.com
    ProxyPreserveHost On

    # setup the reverse proxy
    <Proxy *>
        Order allow,deny
        Allow from all
    </Proxy>
    ProxyPass / http://123.45.66.789:1234/
    ProxyPassReverse / http://123.45.66.789:1234/
</VirtualHost>

When including the ProxyPassReverse it will preserve the subdomain url instead of revealing the IP:PORT on the browser. Just makes for a cleaner finish. Glad it helps

RELATED POST

grep -v or egrep

Filter using -v option and -e options grep "Client ip" /var/log/messages | awk '{print $10}' | grep -v -e "Protocol"…

SQL Dumps & Restore

Take a dump or leave a dump? First backup all the databases mysqldump -u root -p --all-databases > all_db_dump_04APRIL2020.sql You…

Linux Malware Detection

Im running CentOS in the lab environment, running into some issues with NOC saying botnet hijacked one or some of…

Lab Hack: Apache URI purgatory

To HTTP or to HTTPS, that is the question. This lab hack takes me deep into the domain.conf which controls…