I´ve got a Problem with the post/page preview in WordPress.
The Serve-Configuration is as follow:
The WordPress address is set to sub2.example.com (IP: 126.96.36.199),
and the site URL is set to sub1.example.com (IP: 188.8.131.52).
Both IPs directs to the same server, for each IP there is an own Apache-Instance running.
If a Client requests the site sub1.example.com, this "server" requests the wordpress site from sub2.example.com, transforms the output and finally send the transformed output to the requesting client:
+--------+ +------------------+ +------------------+ | | ---> | sub1.example.com | ---> | sub2.example.com | | CLIENT | | | | | | | <--- | IP 184.108.40.206 | <--- | IP: 220.127.116.11 | +--------+ +------------------+ +------------------+ Transforms the WordPress WordPress output
This works as it should, but now comes my problem:
The WordPress admin area is accessible via sub2.example.com/wordpress/wp-admin.
When I edit a post or a page and click on PREVIEW, I get redirected, for example, to http://sub1.example.com/hello-world/?preview=true&preview_id=1&preview_nonce=1234567890.
And this redirect fails: "You do not have the necessary rights to see the preview".
(If I call http://sub2.example.com/hello-world/?preview=true&preview_id=1&preview_nonce=1234567890 it works pretty fine, but i need to call sub1.example.com ...)
First i thought that this is a Problem with the WordPress authentication cookie, so i installed the Root Cookie Plugin. The cookie, wich is set for sub1.example.com contains :
- name: wordpress_logged_in_919292837291837382927,
But this didn´t solve my Problem, I still get the same error.
Some other attempts i´ve tried:
- Setup sub1.example.com as Proxy Server:
define('WP_PROXY_HOST', '18.104.22.168'); define('WP_PROXY_PORT', '80'); define('WP_PROXY_USERNAME', ''); define('WP_PROXY_PASSWORD', ''); define('WP_PROXY_BYPASS_HOSTS', 'localhost');
But this also did not work.
I hope you understand my problem and maybe someone has an idea how to solve this?
Thanks in advanced and sorry for my bad english (this is not my native language :) )