Site Preview does not work: 404 Not Found


2016-11-16 13:22:43 UTC


2017-08-08 13:17:12 UTC


Was this article helpful?

Have more questions?

Submit a request

Site Preview does not work: 404 Not Found

Applicable to:

  • Plesk 12.5 for Linux


  1. Site preview does not work. The following error is shown in a browser:

    Not Found
    The requested URL /plesk-site-preview/ was not found on this server.
  2. The following error in the Apache log:

    [Tue Aug 30 15:27:35 2016] [error] [client] File does not exist: /var/www/vhosts/default/htdocs/plesk-site-preview
  3. There are custom templates in the  /usr/local/psa/admin/conf/templates/ directory configured.


Misconfiguration of /usr/local/psa/admin/conf/templates/custom/server/nginxVhosts.php template file. Reference to nginxSitePreview.php template is missing.


  1. Create service directory in custom templates directory:

    # mkdir /usr/local/psa/admin/conf/templates/custom/service
  2. Copy nginxSitePreview.php file to custom templates directory:

    #  cp /usr/local/psa/admin/conf/templates/default/service/nginxSitePreview.php /usr/local/psa/admin/conf/templates/custom/service
  3. Open /usr/local/psa/admin/conf/templates/custom/server/nginxVhosts.php and add the following line before location section:

    <?php echo $VAR->includeTemplate('service/nginxSitePreview.php') ?>

Default template file /usr/local/psa/admin/conf/templates/default/service/nginxSitePreview.php can be checked as an example.

  1. Rebuild server wide configuration for Apache as follows:
    # /usr/local/psa/admin/bin/httpdmng --reconfigure-server

Note that httpdmng utility restarts Apache web server and it can cause temporary downtime of the service

Have more questions? Submit a request
Please sign in to leave a comment.