Configuring the default virtual host using ISPConfig 3.0.4

Im using ISPConfig 3.0.4. Several sites are already working with him.

I recently installed a multi-user installation of wordpress and want this domain (say, www.domaina.com) to become the default virtual host on the server. Thus, when I add a new site (www.domainb.com), it is sent there by default. If I do not have site security installed in ispconfig configured for domain b. it will now go to www.domainc.com, as it appears to be configured as the default site.

Does anyone know how to change it so that I can make domaina default and not domainc, where I don’t need to make changes every time I add a new site?

+4
source share
2 answers

If you don't have a suitable vhost-based name, apache will show the first site it finds for doamin. To have a global default value for this case, you can add a default vhost to your httpd.conf before the line:
Enable / etc / apache / vhosts / Vhosts _ispconfig.conf:

<VirtualHost 192.168.0.1> ServerAdmin webmaster@yourdomain.com DocumentRoot /path/to/your/company/website/ </VirtualHost> 

Remember to change the IP address, email address and path.

+1
source

From ISPConfig, the best way to achieve this is to create a site that will be the first of your sites in alphabetical order.

For example, 000-default will work.

Then create a redirect to your primary domain (here www.domaina.com ).

0
source

Source: https://habr.com/ru/post/1390556/


All Articles