I’m facing some weird problems when trying to view my WordPress website via Plesk site preview.
The preview url looks as follows:
http://xxx.xxx.xxx.xxx/plesk-site-preview/example.com/xxx.xxx.xxx.xxx/
I already changed the base url of WordPress (Settings -> General) to the url above.
Now, when accessing the url I can see the home page. But when I try to access any subsite, it results in an redirect loop:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error.
When I try to access http://xxx.xxx.xxx.xxx/plesk-site-preview/example.com/xxx.xxx.xxx.xxx/wp-admin/, I get an 502 Bad Gateway error.
The only way I was able to get it working properly was to set the servers ip in my /etc/hosts file to example.com. But thats not an option because I have to send the preview url to my client and it should work out of the box.
2
Answers
Unfortunately I don't have access to the Website Preview Settings mentioned in Oleg's answer.
But I found a workaround using xip.io.
Simply create a domain alias called
within Plesk and you're able to access the website without setting up any DNS records. I don't know why, but without the domain alias it hasn't worked.
Set preview mode to “Quick Preview on a domain name in Plesk” with some domain which can be resolved
https://:8443/admin/server/preview-domain-settings
You will get url like:
Set this url in WordPress settings.