Off the top of my head:
1. Talk to the DNS manager to create an A DNS record for
example.mysite.com pointing to the IP address of your Apache server
2. Enable the
NameVirtualHost directive in httpd.conf (it could be in an include file, so dig deeper!) - Just ensure you use
name-based virtualhosts.
3. You will need to ensure that your Apache instance listens on port 8081 as well. Make an additional
Listen rule .
When you say localhost, then obviously this
example.mysite.com is running on your Desktop, right? Because if it's not, then you will NOT be able to access it.
3. Create a virtual host with the name, i.e.
<Virtualhost
127.0.0.1:8081>
ServerName
example.mysite.com DocumentRoot /some/path/to/your/files
ErrorLog /some/path/to/example-error.log
<Directory /some/path/to/your/files/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
You may need to edit /etc/hosts to add an entry for
example.mysite.com mapped to 127.0.0.1
Restart Apache instace (apachectl graceful) and run tests. Look for clues on example-error.log
PS: This assumes a monolithic configuration of Apache, but with
include(d) config files..
E&OE :-)