1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

site preview problem

Discussion in 'Plesk 10.x for Windows Issues, Fixes, How-To' started by soporteip, May 9, 2011.

  1. soporteip

    soporteip Basic Pleskian

    23
    57%
    Joined:
    Jun 19, 2008
    Messages:
    38
    Likes Received:
    0
    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...
     
  2. soporteip

    soporteip Basic Pleskian

    23
    57%
    Joined:
    Jun 19, 2008
    Messages:
    38
    Likes Received:
    0
    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
     
  3. PavelV

    PavelV Plesk for Windows Staff Member

    28
     
    Joined:
    Nov 15, 2010
    Messages:
    251
    Likes Received:
    15
    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/
     
  4. soporteip

    soporteip Basic Pleskian

    23
    57%
    Joined:
    Jun 19, 2008
    Messages:
    38
    Likes Received:
    0
    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
     
  5. PavelV

    PavelV Plesk for Windows Staff Member

    28
     
    Joined:
    Nov 15, 2010
    Messages:
    251
    Likes Received:
    15
    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.
     
  6. soporteip

    soporteip Basic Pleskian

    23
    57%
    Joined:
    Jun 19, 2008
    Messages:
    38
    Likes Received:
    0
    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
     
  7. PavelV

    PavelV Plesk for Windows Staff Member

    28
     
    Joined:
    Nov 15, 2010
    Messages:
    251
    Likes Received:
    15
    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
     
  8. soporteip

    soporteip Basic Pleskian

    23
    57%
    Joined:
    Jun 19, 2008
    Messages:
    38
    Likes Received:
    0
    is there a chance to the site preview show me the original error?

    Thanks
     
  9. Mission Two

    Mission Two Guest

    0
     
Loading...