Support » Localhost Installs » Problem with WordPress sitting on a backend server.

  • Hi, I have a WordPress server sitting on an internal domain which I want to be available via an external domain name that I use on another server.
    Which means, I want to be available via

    I also added an A-record for on the responsible DNS server for that domain.
    I did set my WordPress URL’s like this:

    WordPress Address (URL)
    Site Address (URL)
    Permalink Settings is set to “Post name” and the following .htaccess file sits in the document root.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    And my Apache VirtualHost file named “” looks like this:

    <VirtualHost *:80>
            # Directory Root
            DocumentRoot /var/www/mysite
            <Directory />
                    Options -Indexes -Includes -ExecCGI FollowSymLinks MultiViews
                    AllowOverride All
            <Directory /var/www/mysite/>
                    Options -Indexes -Includes -ExecCGI FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            # Logfiles
            ErrorLog  /var/log/apache2/mysites_error.log
            # Possible values include: debug, info, notice, warn, error, crit,alert, emerg
            LogLevel debug
            CustomLog /var/log/apache2/mysites_access.log combined

    I have a tested and working netscaler rule that points all* requests to*
    Note, the firewall will not allow external access to the internal domain, so everything client side needs possible requests presented via

    With PC’s on my internal networks, I have no problems to get the wordpress blog presented, works just perfect.
    With PC’s on external networks, I get the main site (index.php) presented, but only the text, all images, css stylesheets and js scripts fail.

    What more do I need to make this work for external clients?

    I also found that typing permalinks doesn’t work from the external connected PC’s.
    As example, doesn’t work since the GET looks for //hello-world/ instead of /hello-world/ like it does when browsing from the internal PC’s.

    I have tried apache mod_proxy to see if that could solve it, but didn’t help either.
    Enabled proxy and proxy_http and used following in the backend domains VirtualHost file:

    ProxyPass /blog/
    ProxyPassReverse /blog/

    Anyone got a setup like the one I try to archive that can see what I’m missing to make it work?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Worked a bit more on it and got following now.

    Virtual host file:


    When I ran WP install for the first time it still went back to the backend url, I switched that:

    WordPress Address (URL)
    Site Address (URL)

    And also edited other references in the DB.

    The site loads scripts and images on index.php now, but still goes back to when I click links.

    Tried then to force the WP and SITE URL’s via wp-config, it still tries to use the backend url.

    Is there some way to force it to use the live url always?

    I have two other WP installations with their own root folders and databases that need to run under the same conditions from the same backend server, so I can not have anything globally on the server, it needs to be done directly on each WordPress installation and the Apache VirtualHost that belongs to it.

    A friend from had the solution for me, so added this to the themes funxtions.php:
    remove_filter('template_redirect', 'redirect_canonical');
    And it works!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with WordPress sitting on a backend server.’ is closed to new replies.