Same FQDN can be set to different virtualhosts

nethserver V7
Module nethserver-virtualhosts

Playing with the module nethserver-virtualhosts, I saw that you can set the same domain name to different virtualhosts. You do not have a validator to check if the FQDN is not already attributed to a virtualhost.

I mean about that

Virtual host names (FQDN)
    The list of Fully Qualified Domain Names that are associated to the virtual host. Values must be separated with a "," (comma).

I think somebody should file a bug about this :hugging:



A fix is ready for testing!

yum --enablerepo=nethserver-testing update nethserver-virtualhosts

I was thinking how to solve this bug, nice code…not tested yet…a bit busy at work

1 Like

what is wrong ?

[root@NS7DEV2 ~]# yum --enablerepo=nethserver-testing update nethserver-virtualhosts
Loaded plugins: changelog, fastestmirror, nethserver_events
stephdl                                                                                                                                                                                     | 2.9 kB  00:00:00     
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * nethforge:
 * nethserver-base:
 * nethserver-updates:
 * updates:
No packages marked for update

[root@NS7DEV2 ~]# rpm -qa nethserver-virtualhosts

I cannot find your testing version

yum clean all --enablerepo=*

then the rpm is available

tested nethserver-virtualhosts-1.0.3-1.3.g8c19de1.ns7.noarch

I can see that a virtualhost is created by default, I did not understand what it means

[root@NS7DEV2 ~]# db vhosts show
    Description=Default virtual host

I can see that now a message is displayed when you try to share the same domain name between vhosts.

I saw also that the key name of the vhost is not tested, you can reuse the same key name.

The fix has been released.

I also noticed the same thing, but this is a different issue. Honestly I didn’t want to open another issue for the web interface :smiley: