2 Domains, 2 Sites, Different folders.

Problems with the Windows version of XAMPP, questions, comments, and anything related.

2 Domains, 2 Sites, Different folders.

Postby Concept » 23. June 2011 05:53

Hello.
I want to use XAMPP to be able to host 2 of my game sites, but I want em to be in a root directory, not be in subfolders.
Now, I have 2 IPs
Lets say IP 1 is "1.1.1.1" and IP 2 is "2.2.2.2"
I want my first site to be accesed using 1.1.1.1:80, in the htdocs folder and my other site 2.2.2.2:80 in the htdocs2 folder.
How to do this exactly? Do I need 2 instance of XAMPP?
Thanks.
Concept
 
Posts: 2
Joined: 23. June 2011 05:51

Re: 2 Domains, 2 Sites, Different folders.

Postby Sharley » 23. June 2011 06:07

You need to look at name-based VirtualHosts if only using the domain names or IP-based VirtualHosts if using separate IPs.
http://httpd.apache.org/docs/2.2/vhosts/

Examples here but keep in mind most things on the Apache site use *nix type settings requiring you to adapt them to suit a Windows Apache server.
http://httpd.apache.org/docs/2.2/vhosts/examples.html

The configurations for vhosts are found in the \xampp\apache\conf\extra\httpd-vhosts.conf file.

A forum search for vhost or virtualhost in the XAMPP for Windows English forum may bring up some useful working examples you could adapt to suit.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: 2 Domains, 2 Sites, Different folders.

Postby Concept » 23. June 2011 06:48

Hey.
Thanks, figured it out.
One more thing, is there a way to make it accesible by a domain? I can do DNS management and make SOMETHING.mydomain.com visit it, but how to make mydomain.com open my xampp page? Without making it local only in the hosts file.
Concept
 
Posts: 2
Joined: 23. June 2011 05:51


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests