rasti.hil@hilandco.com +41 79 367-9677

Friday, 17 August 2012

Wordpress behind Apache proxy


    RewriteEngine On
    RewriteRule ^/wordpress/?$ /wp/ [R]
    ProxyPreserveHost on
    ProxyPass /wp http://127.0.0.1:81/wordpress
    ProxyPassReverse /wp  http://127.0.0.1:81/wordpress

1 comment:

Luis A Lopez Negron said...

If that does not work, add this:
RequestHeader set FORWARDED-HOST your_wordpress_domain

You need to add this to your wordpress wp-config

if ( ! empty( $_SERVER['HTTP_FORWARDED_HOST'] ) ) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_FORWARDED_HOST'];
}