Page 1 of 1

binding XAMPP to just a single IP (SOLVED)

PostPosted: 06. October 2011 22:53
by island55
hello,

i am using XAMPP 1.7.4 on Windows 2008 Server R2 - my server has 2 IPs and i would like to host 2
different sites - 1 site per IP (so i can point DNS to them) i have searched the site as well as google
and i havent came up with anything. can someone please tell me or point me in the direction where
i can resolve this issue!

thanks!

scott

Re: binding XAMPP to just a single IP

PostPosted: 06. October 2011 22:57
by Sharley
Use an IP based VirtualHost:
A forum search for vhost and/or virtualhost or here:
http://httpd.apache.org/docs/2.2/vhosts/

Good luck. :)

Re: binding XAMPP to just a single IP

PostPosted: 06. October 2011 23:14
by island55
ok let me say this --

i want XAMPP to run 1 website on just 1 IP, the other website is being ran from another program
so i dont need to have XAMPP running both websites. does this change anything? so basically i just
want XAMPP running on 1 IP and not running 2 sites on 2 different IPs. (just 1 site on 1 IP)

thanks for the quick reply!!

scott

Re: binding XAMPP to just a single IP

PostPosted: 06. October 2011 23:21
by Sharley
This other program, is it a web server on the same PC?

You may have port conflicts if you try and run both servers at the same time and they are both using the same ports.

Good luck. :)

Re: binding XAMPP to just a single IP

PostPosted: 06. October 2011 23:22
by Altrea
That depends on the ports the other program uses.
configure apache to listen to just the one ip. Thats the important part.

Re: binding XAMPP to just a single IP

PostPosted: 07. October 2011 00:01
by island55
XAMPP will be hosting a site on IP#1 on the default port of 80.
this other hosting program will be hosting a site on IP#2 on port 30000

BUT i do not want IP#1 to work with port 30000 and i do not want IP#2 to work with default port 80

Re: binding XAMPP to just a single IP

PostPosted: 07. October 2011 01:11
by hackattack142
i do not want IP#2 to work with default port 80

You can tell Apache to listen only on a specific IP address. If you open the "xampp/apache/conf/httpd.conf" file, you can edit the line "Listen 80" to "Listen IP#1:80" with your desired IP, and restart Apache. I do not know what you are hosting the other site with but you might be able to do a similar restriction.

Re: binding XAMPP to just a single IP

PostPosted: 07. October 2011 02:11
by island55
hackattack142 wrote:
i do not want IP#2 to work with default port 80

You can tell Apache to listen only on a specific IP address. If you open the "xampp/apache/conf/httpd.conf" file, you can edit the line "Listen 80" to "Listen IP#1:80" with your desired IP, and restart Apache. I do not know what you are hosting the other site with but you might be able to do a similar restriction.



YESSSSSSSSSSS!!

brilliant, this is what i was wanting! thanks guys for all your help