• 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

Client domain showing Test Page - Error log shows all requests going to default vhost

Nonapeptide

New Pleskian
[solved] Domain shows test page - Error log shows all requests going to default vhost

PRODUCT= Parallels Plesk
VERSION= psa-10.3.1-cos5.build1012110718.17
OPERATING SYSTEM= CentOS release 5.7 2.6.18-028stab095.1
ARCHITECTURE= x86_64


PROBLEM DESCRIPTION

One domain for one client will only respond with the Apache 2 Test Page when trying to see the home page. Trying to access specific files in the document root (e.g. www.domain.com/contactus.html) receives a "Not Found" error. Apache's error_log shows that all requests for that client's domain are being directed to the default vhost folder /var/www/vhosts/default/htdocs/ and of course errors are being logged since the client's files are not in that directory.

STEPS TO REPRODUCE

Simply browsing to domain.com. Due to client confidentiality, I cannot share the domain here. I will share the domain privately if necessary.

ACTUAL RESULT

Apache 2 Test Page is displayed.

EXPECTED RESULT

The client's home page and website at large to be rendered.

ANY ADDITIONAL INFORMATION

index.html and index.htm are in the DirectoryIndex declaration in httpd.conf. All other sites and clients on the server are functioning properly.

/var/log/messages shows no Apache/httpd errors. However, /var/log/httpd/error_log shows that for some reason, all requests to that domain are being sent to the default folder. For example:

[Wed May 09 17:43:20 2012] [error] [client 1.1.1.1] File does not exist: /var/www/vhosts/default/htdocs/newsletters

For some reason it appears that this client's domain is not looking to its own vhost volder at /var/www/vhosts/client/ but rather going to /var/www/vhosts/default/

I can't seem to find why this would have suddenly happened. Any ideas?
 
Last edited:
scoured the psa database

I dumped the psa database and grep'd through it for words like default, the default www directory... anything I could think of. I was unable to find any bit of information as to why this client's account might be going to the default web directory when all other signs indicate that it should be looking to its own vhost directory.
 
More thoughts

Thinking about this a bit more, it appears that there's two problems... maybe? The main domain shows the Apache test page, but shouldn't it simply be showing a "Not Found" error if it was purely an issue of looking into the wrong directory? Follow me:

1) Request comes in for the home page
2) Request is served with the Apache testpage
3) Request comes in for a known file in the root www directory (contactus.html)
4) Request is served with Not Found error.

If the first request for the home page came in and Apache didn't find the index.html page, I assumed it would simply serve a 404, and not the Test page. I don't know, but for some reason this seems like a blend of problems.
 
Solved!

After diffing vhost config files, I noticed that all references to the document root was for /var/www/vhost/domain.com/ and not /var/www/vhost/domain.com/httpdocs. Turns out that the information was wrong in the psa database (specifically the hosting table). Remember, Apache configuration files are generated on the fly from information in MySQL. One MySQL UPDATE statement later (as well as /usr/local/psa/admin/bin/httpdmng --reconfigure-domain [domain.com]) and the problem is solved.
 
Thank you!

I have the identical problem and have been tearing my hair out over this. Can you please tell me precisely how you made these changes that you describe? I mean step-by-step instructions. I am on my own, and am a writer by profession, with only the most rudimentary understanding of these issues.

Thanks a million!
 
Last edited:
I have the identical problem and have been tearing my hair out over this. Can you please tell me precisely how you made these changes that you describe? I mean step-by-step instructions. I am on my own, and am a writer by profession, with only the most rudimentary understanding of these issues.

Thanks a million!

First, let me say that I love helping people out whenever I can. I even blogged about this very problem in slightly more detail on my SysAdmin blog. Oddly, the post was published this very morning. Take a look at that and see if it gives you any insight into your problem. I include the SQL statement that I used to update the tables.

Second, let me say that I'm something of a writer too (semi-professional?). I love to write, and especially like to help people in my profession through articles. I've even been published online by a number of online outlets (here and here for example). I'm sure you know the time and detail that goes into making accurate, easy to read work.

Third, I am an independent IT consultant that works on these types of systems for a profession. In fact, this whole issue with my Plesk server was affecting one of my clients (as you will see if you read the blog post I linked to above). I parcel my time out between different clients, projects, and tasks in the course of my day. That brings me to my main point...

I'm truly not trying to be a jerk or opportunistic about this situation. I know you're over a barrel, but the thought of writing out step-by-step instructions for this situation makes me see hours of my time slip away. I've got my Android tablet in a stand right next to me as I type this; I use it as my digital timesheet tracker for clients. I'd easily burn through a few hours to make a tutorial that would include all of the checks, caveats, safety concerns that would need to be explicitly given to someone who doesn't already have years of trained experience in systems administration. Furthermore, I'm not even sure if your problem really is exactly what I had to deal with. Sure it might look like it on the outside, however with such complexity under the hood it could be something different that's causing the problem.

I don't see myself being able to write out such a detailed article that would safeguard you as you work on this. I can throw you a bone and say that you'll first want to perform a full server backup (and ship it off the server somehow; rsync perhaps). Then dump your psa databse for good measure using the command mysqldump -u admin -p`cat /etc/psa/.psa.shadow` psa > /root/psa-dump.sql. Then you can either take that database dump and change the entries before feeding the database back into MySQL or do like I did and use the update statement right from a MySQL prompt.

If you want, you can contact me and we can work out a special rate for my time as a consultant/contractor (I'm a legit LLC working in the US, not some "Oh hey, I also work on them thar 'puters!" deal). PM me or contact me through the contact form on my blog if that's of interest to you.

Some other variables that come to my mind: Is this Linux or Windows? What version of Plesk is this? Do you have SSH access to the server? Furthermore, do you have root access to the server? My experience is only With Plesk 10 on Linux servers. You'll need SSH access as root to fix this or you're out of luck. =|
 
Back
Top