I dont have all the time it would take to go into explicit step by step detail on how to do this. If is very technical. You need to know now to set Name Servers for your domain name, setup dynamic DNS for you domain name, and how to setup the vhost section of your httpd.conf file. If you get stuck, search Google for help.
WAMP does not come with a DNS server, so you need to use a DNS service to setup DNS for you domain name. Signup for DNS service at EveryDNS, it is a free DNS service:
[
www.everydns.net]
Notice that on EveryDNS home page, they list the Name Servers to use to make their DNS service work with your domain name. You need to login to where you registered your domain name and go to your domain name administration panel and set the domain names Name Server settings to this:
Set Name Server one to:
ns1.everydns.net
Set Name Server two to:
ns2.everydns.net
And so on
ns3.everydns.net
ns4.everydns.net
Now, login to your new EveryDNS account. Find the setting
Add new domain and in the box just below it, add your domain name like this:
yourdomain.com
Make sure you do not enter your domain name in this format:
www.yourdomain.com or [
yourdomain.com]
Now click on the circle next to
Make domain dynamic and then click on the
>> Advanced button. After you click the button, your domain name is automatically setup with the A NAME record making your domain DNS sync with your IP address (your WAMP server). Now, we need to add a CNAME record so people can also access your site using www.yourdomain.com instead of just yourdomain.com.
Click on the domain name you just added in your EveryDNS admin account. Now, you need to use the
Add a record to add the new CNAME record for your domain. Use these settings:
Fully Qualified Domain Name: www.yourdomain.com
Record Type: CNAME
Record Value: yourdomain.com
If MX Record, MX Value: (leave blank)
Now click on the
Add Record button, and your new CNAME record will be added to your domain names DNS settings.
One note before we move on to the next step. After you login and change the Name Server settings for you domain name, it will take between 12-48 hours for your new settings to take effect. So, after you follow all these steps to setup domain hosting, and then try to access your site using your domain, it will not work until your name server settings propagate though the Net. So
If you cannot access your website using your domain name, keep trying about every hour or so until it works.
Now we need to setup where we are going to store your website for your domain. For security reasons, we do not include it in the same directory where your www folder is. Make a new folder named
users and put it here:
c:\wamp\users
Now, open the new users folder you just created, create a new folder there named
www.yourdomain.com. Now, go to the new
www.yourdomain.com folder you just made, and make two new folders, one named
public_html and one named
logs. The public_html is where you will place your website files in for your domain. The logs folder is where we will put the access and error logs for your domain name in.
Open notepage, and create a new text file using this html code:
<br /><br /><div align=center>
This is a test page. This in only a test.
</div>
Save the file as
index.html and save it here:
C:\wamp\users\www.yourdomain.com\public_html\index.html
This page is used for testing. When all the settings you have made works, you can test to see if your domain name is working by accessing: [
www.yourdomain.com]
It should display the test html page we just made. If not, then your domain name settings have not propagated yet.
Now we need to edit your httpd.conf file, located in this folder:
c:\wamp\apache2\conf\
Now scroll down to the bottom of the file. Near the bottom you will see:
#NameVirtualHost *:80
Change it to this:
NameVirtualHost *:80
#
#### locahost ####
#
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www
ServerName localhost
ErrorLog C:/wamp/apache2/logs/error.log
CustomLog C:/wamp/apache2/logs/access.log common
<Directory "C:/wamp/www">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#
#### yourdomain.com ####
#
<VirtualHost *:80>
ServerAdmin
webmaster@yourdomain.comDocumentRoot C:/wamp/users/www.yourdomain.com/public_html
ServerName www.yourdomain.com
ServerAlias yourdomain.com
ScriptAlias /cgi-bin/ C:/wamp/users/www.yourdomain.com/public_html/cgi-bin/
ErrorLog C:/wamp/users/www.yourdomain.com/logs/error.log
CustomLog C:/wamp/users/www.yourdomain.com/logs/access.log common
<Directory "C:/wamp/users/www.yourdomain.com/public_html">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "C:/wamp/users/www.yourdomain.com/public_html/cgi-bin">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Now, save httpd.conf, restart apache, and your new settings will now take effect. Remember that your new Name Server settings will take some time to propicate though the Net before you domain name becomes active.
Post Edited (03-05-06 05:46)
CyberSpatium----------------------WAMP Forum Admin
Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.