راستش من این کار رو قدیما انجام دادم و الآن این تنظیمات مربوط به Virual Hostم هست:
# Use name-based virtual hosting.
#
NameVirtualHost *:80
NameVirtualHost *:81
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
<VirtualHost *:80>
ServerName shangool
# ServerAdmin root@shangool
# DocumentRoot /var/www/html
# ErrorLog logs/error_log
# CustomLog logs/access_log common
</VirtualHost>
<VirtualHost *:80>
ServerName mebrahim
ServerAdmin mebrahim@mebrahim
DocumentRoot /home/mebrahim/public_html
ScriptAlias /cgi-bin/ /home/mebrahim/public_html/cgi-bin/
# ErrorLog logs/mebrahim-error_log
# CustomLog logs/mebrahim-access_log common
</VirtualHost>
<VirtualHost *:81>
VirtualDocumentRoot /home/%1/public_html
VirtualScriptAlias /home/%1/public_html/cgi-bin/
ErrorLog logs/public_html-error_log
CustomLog logs/public_html-access_log common
</VirtualHost>
فکر کنم برای قسمت آخر، ماجول vhost_alias_module رو بارگذاری کنی:
$ sudo a2enmod vhost_alias_module