• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Site Preview showing default page instead of index.htm in site.

Zardiw

Basic Pleskian
Why would Plesk show the default webpage when there is a valid index.htm page in the site that's being previewed.

It's not showing that index.htm file.....

I've compared Hosting Settings, nginx/Apache settings, Hosting Access with a site where it IS showing the index.htm file in the site.......and they are the same.

How do I fix it.

Thank You.

z
 
Hi Zardiw,

such issues may appear, if you left the standart Plesk "index.html" file inside your webroot. Pls. note that the default delivery is defined as ( "first come - first serve" :) ):
Code:
index.html index.cgi index.pl index.php index.xhtml index.htm index.shtml
... which you are able to change/modify at your (sub.)domain - specific settings at:

=> HOME > Subscriptions > YOUR-DOMAIN.COM > Apache & nginx Settings

Option: Index files
( can be changed to "custom", with your desired value )
 
No. There is only one index.htm file in the directory........mine.

I have one site that previews correctly.........and the other one doesn't.....

And I can't find any differences in the settings.....

One would think previewing a site is a simple thing.......so how does Plesk mess it up?

I had the same problem on a WP site, and Apache couldn't do it.....had to go to strict nginx.

But this time that didn't work.......turning off Proxy mode had the same result...a default Plesk page being displayed instead of the index.htm file in the directory

Also ....there are no other index type files in there......

I've also checked the source using the Files tool......and that index.htm file is mine...not a default one.

So, HOW can this happen......why is it going to a default page?

z
 
Last edited:
This is what is being displayed:

Web Server's Default Page
This page is generated by Plesk, the leading hosting automation software. You see this page because there is no Web site at this address.

You can do the following:

  • Create domains and set up Web hosting using Plesk.
 
I've also noticed that the little ... pulldown at the end of whatever you are looking at only shows SOME of the sites when you are in Files

It shows all of them on other areas.....

I should probably open an issue on that.......

I've also restarted the server with no resolution....... :(


z
 
Hi Zardiw,

I assume, that you didn't setup a default site for your IP... is this correct? If this is the case, then you will see the default content from "/var/www/vhosts/default/htdocs" ( or what ever is defined as default document - root inside your serverwide ".../plesk.conf.d/server.conf" ( apache + nginx ).

Another option is a possible redirect, which you could check by inspecting the header of your URL, which could be setup with ".htaccess" - files or nginx directives in your configuration files. ;)
 
There IS a default site but I was hesitant to post it here..........

So how can I make it go to the httpdocs folder for the site?

I have another site that works fine.......but these sites don't

I've made the site live now and WAS getting the error below when I go to it:

Edit: But when I disabled Proxy mode, the site works on the web........BUT the Preview does NOT work.

This seems like a Plesk and Apache screwup somehow, because Nginx is serving the page.

Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Thank you for your help!!.......

z
 
Should there only be ONE PHP-FPM service running?

[zxbcSeervices.jpg
 
Btw. I have another site on this server which has TONS of PHP pages/scripts, which has Proxy Mode checked.....and Smart Static files and Static files UN checked, and that site works just fine........

So we have a True Mystery here imvho.......

z
 
And check THIS out....... On another of my new sites WizardsCave.com ......the Preview shows the index page from LightHouseNova.com ........lol..... which is one of the sites that won't show a preview, and shows the default page......

Is there a way to rebuild the database of sites that I have/the pointers/whatever Plesk is using......cause it's HOSED.....lol

z
 
Last edited:
Should there only be ONE PHP-FPM service running?
The PHP-FPM services should be running for all sites that are using the corresponding PHP-FPM module (version).

Is there a way to rebuild the database of sites that I have/the pointers/whatever Plesk is using
On some rare occasions the web server does not work with PHP-FPM although all settings seem to be correct and the server is up. In that case the web server needs to be reconfigured so that the correct PHP-FPM setting is applied to a domain. As an alternative you could toogle the PHP version of the affected domain. The web server configuration needs to be reloaded, too, after reconfiguration. The reconfigure-command does both, for example for a single domain:
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain <domain-name>
or for all domains and basic web server configuration files:
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
 
Thank you.....I did the /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

It took about 30 seconds and went back to a command prompt.........no feedback that it worked....

Do I need to restart the server after that?

Also.....is there a way to look at the Plesk DB and possibly fix errors?

z
 
It took about 30 seconds and went back to a command prompt.........no feedback that it worked....
Correct. There is only feedback, if it does not work.

Do I need to restart the server after that?
No. Restart is included in the command for free ;)

Also.....is there a way to look at the Plesk DB and possibly fix errors?
Please run
# plesk repair db -y
to auto-repair database issues.
 
Thank you.........that command found no errors.

However obviously somehow the preview of one site is going to the index file of another site.

And the preview is working for most of the sites, but not 2 of them.

Is that data in the Plesk DB, or in some conf files?

z
 
Last edited:
Btw........If you're gonna run a command that reconfigures everything.......there should be SOME feedback......lol

Quote: Correct. There is only feedback, if it does not work.
 
All configuration data is stored in the psa database. The Plesk command line utilities create the web server and PHP configuration files from the data that is stored in the database. Running # /usr/local/psa/admin/sbin/httpdmng --reconfigure-all creates all web server configuration files from these data.

For the affected domain you can look into /var/www/vhosts/system/<domainname>/conf/httpd.conf if the document root location is correct. If that is correct, then your website contains a rewrite rule or frameset that it forwards to another website.
 
EDIT: I just checked the Preview and now it shows the correct index.htm file in the domain........unbeal.

Earlier I put in a trouble ticket at my hosting company.........and apparently they fixed it.

I have asked them what was wrong and what they did to fix it....

I will post their response here for the next unlucky sad sack this happens to....

EndEDIT;


I looked at the httpd.conf file and looks OK.......far as I can tell.....says this:
DocumentRoot "/var/www/vhosts/WizardsCave.com/httpdocs" ..........which is correct.
In that folder is an index.htm file........and that file has this in it:

<html>
<head>
<title>Wizards Cave</title>
</head>
<body>
<P>

This is Wizards Cave
</body>
</html>

Which is also correct.

HOWEVER, when I go to Site Preview in Plesk, it brings up the index.htm for a completely different domain: LighthouseNova.com, another site on the server.

I just added all these domains, and haven't even FTP'd anything to Wizards Cave, so where would I find these 'Rewrite' rules if there are any....

Thanks again for all your help.......

z
 
Last edited:
The problem here is certainly the capitalization of the domain name in the configuration path. On some Apache versions this will not work correctly in combination with PHP modules, because the proper paths cannot be found by the services. They are expecting small letters only. This is a bug, but not a Plesk bug. It cannot be solved by Plesk, because it is an error compiled into third party components like httpd. The workaround is to recreate the domains and spell the domain names all in small letters, so that in all configuration files they are used in small letters and paths are all in small letters, too. Test it with one domain first, then - if successful - extend it to the others.

Example for the false version: MyDomain.com
Example for a correct spelling: mydomain.com

When you create your domains all in small letters, you can still use capitalization in your advertising and online use, e.g. you can still enter it as MyDomain.com in a browser. it will correctly open the site. The issue is only that services on the system cannot find the correct paths, because Linux OS makes a difference between small and capital letters and somewhere in httpd and PHP code a transcription from capital to small is done that should not be done. This leads to a "cannot find path" issue. For that reason the expected page cannot be loaded and send to the browser. Bottom line: In Plesk always enter domain names in all small letters.

It is not possible to "rename" an existing subscription or domain from the capitalized spelling to the small spelling. Domains and subscriptions must be re-created (deleted, the created again with the correct spelling).
 
WOW........now THAT was unexpected......lol.........But Thanks for the clarification.....

Well, Site preview works now.......even with the capitalization.

The WizardsCave.com domain was disabled. And when a domain is disabled, somehow Plesk serves some OTHER domain's httpd page....

I tested it with other domains......when they are disabled it shows some other domain's index file.

I still don't know what they did to solve the original site preview not working.....but that is working now...

z
 
Back
Top