• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

images not loading in site preview

C

crash0verride

Guest
Hi,

I migrated 80 sites to plesk last night, but when I preview the sites in "Site Preview", some sites render fine, others do not have their pictures, and on some one them I get the following message:

Code:
ERROR: PleskFatalException
Unable to resolve host name

0: /usr/local/psa/admin/plib/common_func.php3:158
	psaerror(string 'Unable to resolve host name')
1: /usr/local/psa/admin/htdocs/sitepreview.php:14


ERROR: PleskFatalException
Unable to resolve host name

0: /usr/local/psa/admin/plib/common_func.php3:158
	psaerror(string 'Unable to resolve host name')
1: /usr/local/psa/admin/htdocs/sitepreview.php:14

ERROR: PleskFatalException
Unable to resolve host name

0: /usr/local/psa/admin/plib/common_func.php3:158
	psaerror(string 'Unable to resolve host name')
1: /usr/local/psa/admin/htdocs/sitepreview.php:14

Has anyone else experienced this? Anyone any ideas?
 
Hi,

probably in your code the URL of the picture/s is something like:

http://yourdomain.tld/image_folder/image.img

and the domain is not pointed to the server .. then if you try the preview it will show the files that have links like image_folder/image.img or just image.img, but wont show you the files that have a domain in its URL.

...
Unable to resolve host name
...
This error is saying the same.

Hope that helped you and hope a domain propagation is the only issue there. :)

Cheers!
 
I think it is to do with the way the previewing page handles reference paths for the CSS file and the images. When I add the IP to my hosts file and load the page in my bowser 90% of sites work perfectly.

For anyone experiencing problems with the site preview I would suggest hand hacking your hosts file to bypass DNS.
 
Back
Top