• 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

zz010 conf and default site incorrect

B

BrentI

Guest
Hello

I have just noticed recently that the default site for some IP addresses is not the standard plesk site.
The cause for this is that in the zz010_psa_httpd.conf file there are nine valid "Include /home/httpd/vhosts/somedomain.com/conf/httpd.include" lines before the default VirtualHost is output.

This means that if you hit an IP address of any of those sites(listed before the default VirtualHost) that site will be displayed instead of the default plesk site.
I can't see any reason why some of them are before the default VirtualHost.

And as the file is built by plesk the only way to get around it would be to manually move those lines below the default. But then it will be overwritten by plesk.

Has anyone else seen this? Is there a way to get it to correctly output all the Include... httpd.include lines at the correct place in the file?
I am running PSA9.5.3 on CentOS5.5
 
Did you try to reconfigure vhosts configurations with websrvmng utilitiy?
 
I haven't manually run it. However I assumed that by adding or removing domains that it rewrites the file and therefore it would do the same thing.
i.e I have manually reordered the file to correct the issue then added a domain which then re-wrote the file again in the wrong order.
Would you like me to run websrvmng -a?
 
Thanks for your fast response.

I've just run "websrvmng -a" and it rewrote the conf file. However still has the same domains listed before the default vhost.
Therefore no different unfortunately.
 
Sorry, but I do not understand why do you think that IP address of real domain should return default Plesk page instead domain's content?
 
If you hit a shared IP then it returns the default webpage. That is unless you hit the domain name in which case it knows the host header and therefore directs you to the correct VirtualHost.
Normally plesk then displays the default VirtualHost which is correct. However when there are other real VirtualHosts listed before the plesk default VirtualHost it will display the real VirtualHost instead of the default.

As an example create a dns entry for nothing.somedomain.com and point it to any IP on the server. That should display the default plesk server default page. But instead it displays a real website hosted on the server that does not have a ServerAlias for nothing.somedomain.com.
 
Actually. Ive just found the answer. And sorry stupid of me.
The "Default domain" for a couple of IP addresses had defaulted to new sites that had been created. And I hadn't realised as they previously didn't have a default site in the past. I have now changed these back to "None" and that therefore fixes the problem.

Thanks for your help. Problem is now solved.
 
Back
Top