vhost


Dynamic subdomains with mod_vhost_alias

For those using a development server for quite a lot of domains or those using some kind of mass hosting, not wanting to reconfigure each and single domain, this module might be interesting: od_vhost_alias First of all we need to activate the module which is by default included in the apache2 installation: a2enmod vhost_alias Then […]


Wildcard domains with Apache2

Here is a simple way to have wildcard domains in your apache config: Given you're having a webmail application on your server that you would like to use for all of your domains, you could do it as follows: <VirtualHost webmail.example.net:80>   ServerName webmail.example.net   ServerAlias webmail.*   ServerAdmin admin@example.net   DocumentRoot /var/www/webmail   <Directory […]


Advanced Mass Virtual Hosting using mod_macro

On this site you'll find a tutorial on how to do a simple mass virtual hosting. Now we're going to add a little more complexity: Let's have a look at this macro: <Macro VHost $domain $document_root $open_basedir $auth $auth_user> <VirtualHost 123.123.123.123:80>   ServerName $domain   ServerAlias www.$domain   ServerAdmin admin@$domain   DocumentRoot $document_root   php_admin_value […]


Simple Mass Virtual Hosting using mod_macro

Given you have a lot of virtual hosts, usually you have a lot of configuration parts that are repeating. So why not creating macros for the different configurations that are possible and then using them for your hosts? To achieve this, we're using the apache module mod_macro which you can install on debian systems with: apt-get […]