• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Adding website sets the wrong default vhost

L

Laurent Bauer

Guest
Hello,

Each time a site is added on my plesk box, the httpd.include file is regenerated with the wrong default vhost.
I get the same problem when running 'websrvmng -av'.
Here is what httpd.include looks like :

<Directory "/var/www/vhosts">
[...]
<Directory "/var/mailman">
[...]
</IfModule>
Include <mysite1>/conf/httpd.include

[IP-based VirtualHosts]

Include <mysite2>/conf/httpd.include
Include <mysite3>/conf/httpd.include
...


The "mysite1" declaration should be inserted in last block with other "Include"s, but it is inserted before the default vhost declaration, so "mysite1" is displayed instead of the default server page (which we customized for a particular use)

I tried using --(re)set-default-domain but it generates the same file as websrvmng -av.
I noticed that this "mysite1" was the first domain in alphabetical order. But when I disable this domain and run a reconfigure again, I don't get the second domain at the first one's place as I imagined...

Does anyone know this issue ?

Thanks

Laurent
 
I think we've got the solution :
The GUI does not allow to uncheck a default domain (in the IP pool configuration section) once it is set.

But you can manually connect to psa database and reset 'default_domain_id' in 'IP_Addresses' table :

update IP_Addresses set default_domain_id=NULL where ip_address='...'

Then websrvmng does not set a default vhost, i.e it lets /home/httpd/vhosts/default as the default vhost.
 
Back
Top