• I’ve found a few articles describing how to setup a reverse proxy with nginx, but I haven’t found one (or one i understand enough) describing how to do it with apache 2.4 Here’s what I’ve come up with so far:

    domain = mydomainname.com
    internal ip address of WP installation = 192.168.99.200
    internal ip address of apache installation = 192.168.99.100

    apache – httpd-vhosts.conf
    <VirtualHost *:80>
    RequestHeader set X-Forwarded-Proto “http”
    ServerName 192.168.99.200
    ProxyPreserveHost On
    ProxyPass /wordpress https://192.168.99.200/wordpress
    ProxyPassReverse /wordpress https://192.168.99.200/wordpress
    </VirtualHost>

    and per this https://www.ads-software.com/support/topic/wordpress-behind-reverse-proxy-1, i added the following to the wp-config.php

    $_SERVER[‘HTTP_HOST’] = $_SERVER[‘HTTP_X_FORWARDED_HOST’];
    define(‘WP_HOME’, ‘https://mydomainname.com/wordpress&#8217;);
    define(‘WP_SITEURL’, ‘https://mydomainname.com/wordpress&#8217;);

    $_SERVER[‘REQUEST_URI’] = str_replace(“192.168.99.200”, “mydomainname.com”, $_SERVER[‘REQUEST_URI’]);

    I’m sure I’ve mangled some of the suggestions from the various articles I’ve seen, but I’ve somehow at least gotten to the point where I can login to the admin console. The rest of the pages seem to be dysfunctional.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I set up a reverse proxy with apache 2.4’ is closed to new replies.