Domain directing in WAMP?
Posted by: john.weland (---.block0.gvtc.com)
Date: January 12, 2012 12:32AM

Let me start off by saying I am extremely new to running a server. I had a spare desktop sitting around so I thought turning it in to a web server to testing out websites BEFORE buying professional grade hosting might be a good idea and I might learn a bit. 48 hours in to it, I learned LINUX makes me what to slit my own throat. So I found WAMP.

I have WAMP2.2 (x64) setup on my spare desktop which is running Windows 7. I went to godaddy and pointed two of my domains to my home IP and it works. the problem is I want mydomain1.com to point to my root folder and mydomain2.com to point to a sub folder. Currently both point to my root.

domain.no-ip.org which is my DDNS points to my root (c:/wamp/www) which is fine but I want alphamma.com to point to (c:/wamp/www/apha) I am building a website for a mixed martial arts school. I have other sites I want ot run similarly with other domains on my home server.

I can access the websites from domain.no-ip.org/folder but if I have the proper domains sitting around I'd like to use them. I called godaddy and they told me that once the domain is pointed to my IP matching the domain to the proper subfolder is all handled by the server.


Any help is appreciated.

Options: ReplyQuote
Re: Domain directing in WAMP?
Posted by: califdon (---.dsl.dynamic.sonic.net)
Date: January 12, 2012 03:11AM

What you are describing is called Virtual Host in Apache. It's not hard to establish that in your httpd.conf file. Look up apache virtual host in Google and you'll find lots of help.

______________________________________________________________________________
The early bird may get the worm, but it's the second mouse that gets the cheese.

Options: ReplyQuote
Re: Domain directing in WAMP?
Posted by: john.weland (---.block0.gvtc.com)
Date: January 12, 2012 04:15AM

Yup sure did and it works... or it seemed too If i am on a computer connected to the same network as the server i can hit up "domain.com" or "internal ip" and even "ISPgivenIP". the moment i jump off the network with my other laptop and go on mobile broadband i can't connect to anything.

Options: ReplyQuote
Re: Domain directing in WAMP?
Posted by: califdon (---.dsl.dynamic.sonic.net)
Date: January 12, 2012 07:41PM

I'm afraid you lost me. Virtual Host is a way of resolving several different domain names, each of which is resolved to the same Apache server by DNS, and having Apache determine the correct Document Root on its file system by examining the domain name that was requested. I think that's what you were trying to do, so the best I can suggest is that you read up on Virtual Host in Apache documentation or online tutorials.

[Edit:] I went back and read your original post and I think I see what you're doing now. If you are merely redirecting from GoDaddy to your home IP address, Virtual Host won't handle that, because GoDaddy isn't passing through the data that could let your Apache server know which domain had been requested. Virtual Host would work if you changed your DNS records, but not if you're just redirecting, using PHP. It could probably be done using .htaccess file, but I'd have to experiment with that. Maybe someone else can give you better guidance on this than I can.



Edited 1 time(s). Last edit at 01/12/2012 07:46PM by califdon.

Options: ReplyQuote
Re: Domain directing in WAMP?
Posted by: yfastud (Moderator)
Date: January 14, 2012 07:18PM

No matter within or outside LAN access, you need to setup Access, DNS, and VH; Access for permission to connect to your Wamp PC, DNS to tie Domain(s) to your Wamp PC, and VH to host multiple Domains/Websites/IP's and even you have only 1 Domain/IP, you should use VH to set it up w/ the site you want to show up first on top and localhost on bottom and others in middle if having more than 1 site; w/ VH, other PC's, no matter w/i or outside LAN, can access/see websites/contents of that particular folder set for that particular VH on your wamp PC. If dont have real Domain, just skip DNS guide

To setup Access, follow this
[blog.jlbn.net]

To setup VH, follow this
[blog.jlbn.net]

To setup DNS, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.