Hi Craig,
I just went trough this and had a few problems. Here's how I did it with some tips.
I used Virtual Hosts following SteveMartin's suggestions in this [
forum.wampserver.com].
This works but your requirements may be different.
I'm using yoru sample Domain name as an example, replace my names with yours as appropriate.
I used the install default C:\wamp
I put my sites in subdirectories of C:\mysites
I put my VirtualHost cnfigurations files in C:\wamp\vhosts [see httpd.conf]
I named each subdireoctory with the Domain name I used e.g mysite.dyndns-server.com
I also named the VHost configuration files in C:\wamp\vhosts with the same name and a .conf extension
[ I patched C:\wamp\www\index.php to display these in the localhost wamperserver page]
I got a free Domian name / DNS entry and pointed it at my public IP address.
When testing locally I included entries in C:\WINDOWS\System32\drivers\etc\hosts for mysite.dyndns-
server.com.
When 'ONLINE' I commented out this entry so I access via the internet DNS.
Here are my relevant httpd.conf entries In :
C:\wamp\bin\apache\Apache2.4.4\conf\httpd.conf
ServerRoot "c:/wamp/bin/apache/apache2.4.4"
DocumentRoot "c:/wamp/www"
ErrorLog "c:/wamp/logs/apache_error.log"
# Temporary for debugging
# LogLevel warn
LogLevel debug
<IfModule log_config_module>
....
CustomLog "c:/wamp/logs/access.log" common
.....
</IfModule>
# Helps to know whether in main server or a Virtual Host
ErrorDocument 403 "<h2>Main: You can't come in here</h2>"
ErrorDocument 404 "<h2>Main: That's not here!</h2>"
ErrorDocument 500 "<h2>Main:My life is a mess and so is my server!</h2>"
# # DO NOT SERVE ANY REQUESTS TO ACCESS THE FILE SYSTEM
# # EXCEPT as explicitly allowed in any following or Included <Directory >... </Directory > block
<Directory />
AllowOverride none
Require all denied
</Directory>
...
# Virtual Hosts
# First / Default, it's NOW a VHost [In httpd.conf BEFORE any others or any Includes for VHosts]
<VirtualHost *:80>
DocumentRoot "C:/wamp/www"
ServerName localhost
ServerAlias localhost
Options Indexes FollowSymLinks
<Directory "C:/wamp/www">
Options Indexes
AllowOverride None
# onlineoffline tag - don't remove
# # LOCAL ACCESS ONLY
Require local
</Directory>
</VirtualHost>
# This is where to put vhost .conf files
# Name each one with the same name as the C:\mysites\[subdirectory for site]
# This subdirectory name/ VHost Name must be the same as the Domain name used to access your server
IncludeOptional "c:/wamp/vhosts/*"
....
# == NOT INCLUDED ========
#Include conf/extra/httpd-vhosts.conf
Note from the above The loglevel, logfile names and IncludeOptional for VHosts,
VHOST configuration file in C:\wamp\vhosts\mysite.dyndns-server.com.conf
<VirtualHost *:80>
DocumentRoot "C:/mysites/mysite.dyndns-server.com"
ServerName mysite.dyndns-server.com
ServerAlias www.mysite.dyndns-server.com
Options Indexes FollowSymLinks
ErrorLog "C:/mysitesLogs/mysite.dyndns-server.com-error.log"
CustomLog "C:/mysitesLogs/mysite.dyndns-server.com-access.log" common
# Helps to know whether in main server or a Virtual Host
ErrorDocument 403 "<h2>mysite: Forbidden</h2>"
ErrorDocument 404 "<h2>mysite: Not Found</h2>"
ErrorDocument 500 "<h2>mysite: Yikes!</h2>"
<Directory "C:/mysites/mysite.dyndns-server.com">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Troubleshooting :
Test everything locally first
Then comment out the hosts entries for the site.
Make sure that you have port forwarded port 80 to your Apache server.
If things don't start or run as expected run this in a CMD Window
It checks for config errors and you'll also see if Apache sees your Vhosts as you expected. It often catches errors / typos you can't find.
C:\wamp\bin\apache\Apache2.4.4\bin\httpd -S
I re-direct the output into a .txt file that I keep open in Notepad++
When accessing your site, you may get 404 errors if Apache can't find your pages. This can happen if your VHost definitions are wrong,
403 errors when your <Directory> permissions forbid serving them, check your <Directory > names and permissions
If you don't understand what is happening, look at your logs.
When troubleshooting I leave them open in separate tabs in NotePad++, and the files refresh as they change.
c:\wamp\logs\apache_error.log
c:\wamp\logs\access.log
C:\mysitesLogs\mysite.dyndns-server.com-error.log
C:\mysitesLogs\mysite.dyndns-server.com-access.log