• 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

site preview problem

soporteip

Basic Pleskian
Hi,

I have a fresh install of Plesk 10.2 Windows with 6 domains in .NET. I have a wierd problem with the site preview feature, it's not working with 5 of the 6 domains (it returns 500 Internal server error) but with one domain (also in .NET) the site preview shows only the text of the site, the GETs for the images and the styles returns "404 Not Found"

My server specs:
Windows 2003 Server 64 bits (IIS 6.0)
SQL Server 2008 64 bits
.NET Framework 3.5
Plesk 10.2

I've alredy try this post with no success http://forum.parallels.com/showthread.php?t=106021&highlight=site+preview

All sugestions are welcome

P.D: sorry for my english...
 
I understand that in plesk 10.2 the isapi mod rewrite is not used anymore for the site preview feature.

So, how it works now?
Maybe knowing this, I can search any problem in the process because now I don´t know even where to start to search the problem...

Thanks
 
you should enable HTTP errors detailed mode for your sites and then try to access them again, so you can understand reason of 500 error.

If you have some site previewed badly (only text, no images, broken styles) - this can be because of absolute URLs used for images and CSS styles. absolute url is requested by your browser without sitepreview handler. If this is your case - you cannot change anything.

Best solution for you will be to write your host (while it is unresolvable) to etc/hosts file.
http://www.windowsreference.com/windows-7/edit-hosts-file-in-windows-7-windows-vista/
 
Thanks for the answer

The custom errors are disabled, and I'm using Firefox/Chrome so they should show me the complete error.

Anyway, I focus in the site that i'm sure that it is working ok. This is the site with the problem in the styles and images

Respect to the css and image loading, I'm using relative URLs. Here is an example of the CSS loading:

In the source code of the site:
<link href="/Templates/_design/general.css" rel="stylesheet" type="text/css" />

The GET in the site preview:
https://plesk.hostname:8443/Templates/_design/general.css
Where plesk.hostname resolves to the IP of the server and is his hostname
Result: "404 Not Found"
I can see this in FireBug

thanks
 
sitepreview is handler which is working on Plesk site
Assume you are requesting:
https://pleskhost:8443/sitepreview/http/yourdomain.com/yourscript.aspx will be internally translated into request to http://yourdomain.com/yourscript.aspx

This script returns HTML code that is requesting /templates/general.css
This rule will be requested in browser like: https://pleskhost:8443/templates/general.css which not exists.

I just need to say that sitepreview doesn't work in 100% of cases. Like in your case. if you will have css link without starting slash, then probably it will work fine.

Once again, if you need to have access to all functionality of your domain, and it is not resolved yet, you should either specify DNS of your server directly in your network settings, or temporary put your domain in etc/hosts file. Other solutions (that proxy requests) will have drawbacks.

I hope my explanation will help you somehow.
 
thanks for the help. I'm going to put the links for css and images without starting slash

the last thing that I can't resolve is that the errors raised by the site are not showed in the site preview. Instead, it shows a blank page with the string "Error occured." (note the spelling error in "occured")
If I put the domain in etc/hosts, I can see the complete error in any browser

Do you have any idea why this is happening?

Thanks
 
this is legacy behavior of sitepreview handler. If non 200 error code returned, then hardcoded message "Error occured" written to output.
Thank you for detection of spelling error
 
Back
Top