Hacks:Engine:Temporary address to domains

From VHCP Support

Jump to: navigation, search

Preparing configs

Activating the userdir module

ln -s /etc/apache2/mods-available/userdir.* /etc/apache2/mods-enabled/

Edit /etc/apache2/mods-enabled/userdir.conf and add following lines: (remove <IfModule> section if exists already..)


<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName users.yourdomain.com

    DocumentRoot /var/www/webadmin/gui
    <Directory /var/www/webadmin/gui>

        Options Indexes Includes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all

    </Directory>

<IfModule mod_userdir.c>

    UserDir /var/www/virtual/*/htdocs
    UserDir disabled root


    <Directory /var/www/virtual/*/htdocs>

        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

    </Directory>

</IfModule>
</VirtualHost>

Where xxx.xxx.xxx.xxx is the IP address of your server.

Make sure that subdomain (users.yourdomain.com) is pointing to your server! If your server is hosting that domain, you can add it like this:

Edit /var/cache/bind/yourdomain.com.db and add following lines

users.yourdomain.com IN A xxx.xxx.xxx.xxx

Where xxx.xxx.xxx.xxx is the IP address of your server.

Restart apache and bind

/etc/init.d/apache2 restart
/etc/init.d/bind9 restart

Using

Domains are available now on http://users.yourdomain.com/~userdomain.tld

External links

Personal tools