Support / KnowledgeBase

 
Search the KnowledgeBase Search

Site Preview Issues in Plesk

  • Applies to: (dpv) Nitro, All (dv)

  • Difficulty: Easy

  • Time needed: 5 minutes

  • Tools needed: None

 

This article details how to fix a malfunctioning "Site Preview" button.

The Plesk control panel contains a method to test a site out before the domain name points to the server. This is useful if you are moving a site hosted elsewhere to your Plesk server and wish to make sure it is working before making it live.

To preview your site:

  • Log into your Plesk control panel
  • Click on "Domains" and then on the domain you'd like to preview
  • Click on "Site Preview" to preview the site on your Plesk server

Sometimes this button gives a "404 Not Found" error, if this is the case you need to make some changes to Plesk to fix the button. The easiest way to fix the preview button is to update Plesk to the most current version. If you don't want to use the updater feature you can fix the button manually, you will need your root SSH password and the ability to use command line tools.

To fix the preview button:

  • Log into your server via SSH as the user 'root', if you don't already have your root password you can contact Technical Support to have it reset for you
  • Edit the file /usr/local/psa/admin/conf/httpsd.conf, a command like this should work:
    vi /usr/local/psa/admin/conf/httpsd.conf
  • Near the end of the file in the section marked <VirtualHost _default_:8880> add these lines:
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/sitepreview/(.{0,})$
    RewriteRule ^/sitepreview/(.{0,})$ /sitepreview.php?$1 [L]
  • Save that file and restart the psa service, a command like this should work:
    /etc/init.d/psa restart

The Site Preview button should be functional now.

Revisions:

07-20-2009: Minor Fixes
 


User Comments

No visitor comments posted. Post a comment

Fields marked with an asterisk(*) are required. Comment on this article

Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue