Failed to create virtual server: The domain X is already hosted by your Apache webserver

5 posts / 0 new
Last post
#1 Wed, 07/09/2014 - 08:53
AntonyT

Failed to create virtual server: The domain X is already hosted by your Apache webserver

I try to delete an Alias (for example X domain) from another Top Level Virtual server.

When I was going to do that I see a checkbox that it say “Only remove server from Virtualmin's control, and leave website, users and databases untouched“.

I check this because I was afraid it will delete something from the Top Level Domain (I know now that sounds stupid)

Now I try to create a new Top Level virtual server with the same X domain, but when I do that it says

“Failed to create virtual server : The domain X is already hosted by your Apache webserver”

How do I fix that?

Can I remove everything that it left behind manually and to create a new virtual server?

Thanks

Wed, 07/09/2014 - 09:31
andreychek

Howdy,

It sounds like the Apache configuration for this particular domain still exists in Apache. You would need to manually remove that in order to add that domain into Virtualmin again.

Which Linux distro/version is it that you're using?

-Eric

Wed, 07/09/2014 - 10:06
AntonyT

As I see from command line it's a Red Hat 4.1.2 release

Wed, 07/09/2014 - 10:28
andreychek

Howdy,

Hmm, just to verify -- what is the output of this command:

cat /etc/issue

However, I suspect that the entry that needs removed is in /etc/httpd/conf/httpd.conf.

There would be a "VirtualHost" block in there associated with this particular domain... you could need to remove the entire VirtualHost block for that doman, and then restart Apache.

If you're unsure about how to do that, you may want to make a backup of the config file before making a change to it :-)

-Eric

Wed, 07/09/2014 - 11:57
AntonyT

You are correct, I wasn't sure for RedHat, because I didn't remember that :)..

I used the uname -a and it says RedHat the correct is CentOS (I forget that CentOS based on RedHat).

I edit the httpd.conf file and I removed the alias of the domain that was blocked.

After that (and without restart of apache) it was able to create the virtual server.

I have to wait now 24h for DNS servers, I hope that now the domain works without problems.

Thanks for your help.

Topic locked