Sites or virtual hosts are extremely useful when you are hosting more than one website on a box. I’ve already shown you how to set up virtual hosts under Apache 2, but I thought I would quickly just give a little more insight into what the a2ensite and converse a2dissite function calls do.
All that a2ensite is, is a script that enables specified sites (which contain a
block) within the apache2 configuration.
It achieves this by creating symlinks within /etc/apache2/sites-enabled. The opposite of doing this is a2dissite which disables the site by removing that symlink.
Funnily enough, you can enable or disable a site multiple times without getting an error, simply because all these scripts are doing is manipulating symlinks. Lastly, the default site is handled specially, with a resulting symlink called 000-default in order to be loaded first.
And now you know.
You might also enjoy:
-
As a web developer I need to juggle a number of projects on my development machine all at once. The simple way to get around accessing these various sites i ...
-
If you've ever tried to do an ASP include using the following sort of input line, , on an IIS web server and you've come up short, the 500.100 error message ...
-
Have you ever wanted to use Google to search within a particular website before?Actually, Google makes this pretty simple thanks to its special site: syntax ...
-
LAMP (Linux, Apache, mySQL and PHP) is a popular open source web development platform that uses Linux as its operating system, Apache as the web server, myS ...
-
Favicons are a great way to personalize one's website, and getting a Joomla 1.5 website to display your custom favicon.ico file turns out to be a pretty sim ...