• I have a WordPress installation on my local LAN which I’m accessing as http://bitwp.edwards.local/. But I also want to be able to access it from the internet when I’m off the premises.

    I have a dynamic DNS hostname of xxxxxxx.dtdns.net and there is an apache web server in the DMZ server listening on port 8000. So I can successfully access other internal sites with URLs such as http://xxxxxxx.dtdns.net:8000/server1 http://xxxxxxx.dtdns.net:8000/server2 etc by using apache ProxyPass directives on the DMZ.

    But when I try to do this for the WordPress site on my local LAN, I can get the home page up but the images are all broken and none of the links to any of the posts work.

    From what I’ve read this is because the WordPress server is using xxxxxxx.dtdns.net:8000 as the URL for links, which obviously isn’t valid. So how do I get this working?

    My ProxyPass directives on the DMZ look like this:

    <Location "/wordpress">
    ProxyPass http://bitwp.edwards.local/
    ProxyPassReverse http://bitwp.edwards.local/
    </Location>
    • This topic was modified 8 years, 1 month ago by philled.
    • This topic was modified 8 years, 1 month ago by philled.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Dion

    (@diondesigns)

    For better or worse (usually worse), WordPress is hardcoded to a single URL. That means it’s not possible to access WordPress using two different URLs; it will only work with the URL that is set on the General Settings admin page.

    I’d personally like to see support for relative URLs. Right now WordPress will accept relative URLs if they’re added in wp-config.php, but the Customizer will not work correctly because it also hardcodes URLs. Some fairly simple code changes would result in full support for relative URLs. Wow, imagine this…putting / as the site and home URLs, and having your WordPress installation work correctly if moved to any root-level domain!

    Thread Starter philled

    (@philled)

    Thanks for the info about the relative URLs. Does that also include port number? The request from the internet will come in on port 8000 (as my ISP doesn’t allow incoming port 80), but the destination WordPress server will obviously be running on port 80. Do I therefore need to run the WordPress server on port 8000 so the URL is the same as the URL coming in from the internet?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘ProxyPass to internal WordPress server from internet’ is closed to new replies.