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 http://my.backend.domain.com to be available via http://mylivedomain.net/blogI also added an A-record for my.backend.domain.com on the responsible DNS server for that domain.
I did set my WordPress URL’s like this:WordPress Address (URL) http://my.backend.domain.com
Site Address (URL) http://mylivedomain.net/blog
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] </IfModule>And my Apache VirtualHost file named “my.backend.domain.com” looks like this:
<VirtualHost *:80> ServerAdmin [email protected] ServerName my.backend.domain.com # Directory Root DocumentRoot /var/www/mysite <Directory /> Options -Indexes -Includes -ExecCGI FollowSymLinks MultiViews AllowOverride All </Directory> <Directory /var/www/mysite/> Options -Indexes -Includes -ExecCGI FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> # 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 </VirtualHost>I have a tested and working netscaler rule that points all http://mylivedomain.net/blog* requests to http://my.backend.domain.com*
Note, the firewall will not allow external access to the internal domain, so everything client side needs possible requests presented via mylivedomain.net/blog.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, http://mylivedomain.net/blog/hello-world/ 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/ http://my.backend.domain.com/ ProxyPassReverse /blog/ http://my.backend.domain.com/Anyone got a setup like the one I try to archive that can see what I’m missing to make it work?
The topic ‘Problem with WordPress sitting on a backend server.’ is closed to new replies.