: Pointing a domain to XAMPP VHost I'm using XAMPP on a VPS of mine, where I try to host 2 different websites at the moment. I plan on being able to host more. Currently; if I go to the
I'm using XAMPP on a VPS of mine, where I try to host 2 different websites at the moment. I plan on being able to host more. Currently; if I go to the VPS IP and one of the defined ports (in this case the two different ports I use are 8001 and 8002) a different site displays. Port 8001 reads from one directory and port 8002 from another.
Now comes the tricky part. I want a domain of mine - let's say foo.com - direct to the IP with port 8001 for example. How can I do this? I was thinking it was via DNS but I read something that DNS has no perception of ports.
UPDATE: As per usual I always plan things to be much more complicated than they are. Correct vHost-settings = no need for ports etc ;)
More posts by @Samaraweera270
1 Comments
Sorted by latest first Latest Oldest Best
You are trying to over complicate things. XAMPP includes Apache (which has vHost support). You do this much the same as any other vHost setup. You create a new vHost configuration setting the hostname to the right domain name and the document root to the appropriate file path on the file system. By doing this you are only using a single port (port 80, the default http port) but you can run as many websites as your server can handle based on simultaneous connections.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.