Skip to main content
added 1284 characters in body
Source Link
schnippy
  • 5.3k
  • 18
  • 25

RemoveYou can't have an index.html in the root of your default directory (assuming there is nothing in there, Drupal doesn't treat these directories like normal web folders. If you want) and symlink it example.com to the site directory you want itgo to be using instead, exa folder with a plain index. if you wanthtml file in it, you're going to be pointingneed to site1edit your vhosts configuration. Right now, your vhost file probably looks something like this:

ln<VirtualHost -s*:80>
  ServerName example.com
  ServerAlias www.site1.com, defaultwww.site2.com, www.site3.com
  DocumentRoot /var/www/YOURDOCROOT
...etc

You could also point your primary domainWhat this is doing is redirecting all sites that match either the server name or server alias and sending them to the DocumentRoot folder specified. When it gets there as well using symlinks, Drupal tries to map the http requests to the appropriate folder but finding none for example.com, it sends it to the default directory instead.

If you want it to go to a single-page index.html, you are going to have to remove example.com from your vhost above and setup a new one, pointing example.com to that new folder, ex:.

ln<VirtualHost -s*:80>
 www.site1 ServerName example.com 
 example DocumentRoot /var/www/EXAMPLECOMDOCROOT
...etc

and place your index file in there.

If instead you want Drupal to send all traffic to one of your subsites, you can try either of these two methods:

  1. Remove the default directory (assuming there is nothing in there you want) and symlink it to the site directory you want it to be using instead, ex. if you want it to be pointing to site1

    ln -s www.site1.com default

  2. You could also point your primary domain there as well using symlinks, ex:

    ln -s www.site1.com example

Remove the default directory (assuming there is nothing in there you want) and symlink it to the site directory you want it to be using instead, ex. if you want it to be pointing to site1

ln -s www.site1.com default

You could also point your primary domain there as well using symlinks, ex:

ln -s www.site1.com example 

You can't have an index.html in the root of your default directory, Drupal doesn't treat these directories like normal web folders. If you want example.com to go to a folder with a plain index.html file in it, you're going to need to edit your vhosts configuration. Right now, your vhost file probably looks something like this:

<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.site1.com, www.site2.com, www.site3.com
  DocumentRoot /var/www/YOURDOCROOT
...etc

What this is doing is redirecting all sites that match either the server name or server alias and sending them to the DocumentRoot folder specified. When it gets there, Drupal tries to map the http requests to the appropriate folder but finding none for example.com, it sends it to the default directory instead.

If you want it to go to a single-page index.html, you are going to have to remove example.com from your vhost above and setup a new one, pointing example.com to that new folder, ex.

<VirtualHost *:80>
  ServerName example.com 
  DocumentRoot /var/www/EXAMPLECOMDOCROOT
...etc

and place your index file in there.

If instead you want Drupal to send all traffic to one of your subsites, you can try either of these two methods:

  1. Remove the default directory (assuming there is nothing in there you want) and symlink it to the site directory you want it to be using instead, ex. if you want it to be pointing to site1

    ln -s www.site1.com default

  2. You could also point your primary domain there as well using symlinks, ex:

    ln -s www.site1.com example

Source Link
schnippy
  • 5.3k
  • 18
  • 25

Remove the default directory (assuming there is nothing in there you want) and symlink it to the site directory you want it to be using instead, ex. if you want it to be pointing to site1

ln -s www.site1.com default

You could also point your primary domain there as well using symlinks, ex:

ln -s www.site1.com example