Sonic and Sega Retro Message Board: XAMPP help - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

XAMPP help XAMP + local network

#1 User is offline Travelsonic 

Posted 14 August 2013 - 11:00 AM

  • Posts: 661
  • Joined: 01-March 05
If it is possible, what is the best means of restricting access to a server running on XAMPP to only a local network - like, say, a bunch of computers in an office?
This post has been edited by Travelsonic: 14 August 2013 - 11:01 AM

#2 User is offline UltimateVG 

Posted 14 August 2013 - 01:28 PM

  • Posts: 169
  • Joined: 25-December 03
  • Gender:Male
  • Location:Illinois
  • Project:Stratonix 2.0, Euayfcialty Network
  • Wiki edits:1
What kind of server are you talking? XAMPP has several. If you mean Apache, you can bind it by changing the "Listen" line in (XAMPP directory)\apache\conf\httpd.conf.

For example, if the server's local IP is 192.168.1.1, you would change it to "Listen 192.168.1.1:80"

EDIT: Brain are not good at smartmaking today. Fixed syntax.
This post has been edited by UltimateVG: 14 August 2013 - 01:29 PM

#3 User is offline Travelsonic 

Posted 15 September 2013 - 10:13 AM

  • Posts: 661
  • Joined: 01-March 05
I am using Xampp w/ Apache.

Got this figured out, now got another problem:

Say you have file server [s], computers [computer 1], [computer 2], [computer 3].

And Apache is on [s], configured w/ the listen line in the http.conf as "Listen *:80

I can start Xampp on [computer 1], open firefox, and type in [computer 1]'s IPv4 address, get on no problem.

But if I tried it with [computer 2] or [computer 3], that is, start Xampp on [s] from [computer 2], open firefox, and type in [computer 2]'s IPv4 address, or start Xampp on [s] from [computer 3], open firefox, and type in [computer 3]'s IPv4 address, it fails to connect.

Any insight as to what I fucked up this time? :v:/>
This post has been edited by Travelsonic: 15 September 2013 - 10:15 AM

#4 User is offline Overlord 

Posted 15 September 2013 - 12:50 PM

  • Cat-herder
  • Posts: 14494
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
Firewall block? Sounds like it's OK. If computer 1 is 192.168.1.1 and computer 2 is 192.168.1.2 , then if you can access http://192.168.1.1:80 on computer 1 it should work on computer 2, unless there's a firewall in the way.

#5 User is offline Travelsonic 

Posted 15 September 2013 - 07:56 PM

  • Posts: 661
  • Joined: 01-March 05
When I have Xampp on [computer 1] I can access it from any other computers on the local network just fine... must be firewall issues then? But how since all the computers have the same firewall in place, same settings each, etc?
This post has been edited by Travelsonic: 16 September 2013 - 09:31 AM

#6 User is offline Travelsonic 

Posted 01 October 2013 - 12:09 PM

  • Posts: 661
  • Joined: 01-March 05
New issue.

So I made it so on file server [s], xampp resides, and each computer will have a shortcut to a launcher that runs Xampp, and the appropriate browser - and when the browser is closed stops xampp. I coded this in C++.

I decided to go a slightly convoluted way of getting the computer's IPv4 address [as the argument passed when launching the browser] - getting the data from running ipconfig, dumping it to a text file, reading it, and grabbing just the line with the IP address, and using that. I went this way because I'm fucking sick of this project, just want it done hacking together what I already know regarding creating processes, running programs w/ arguments passed, instead of wasting time learning new things like winsock [considering how I am passed my deadline already - and my 'rents, whom I'm programming this for, want it done. >_< ].

On at least 2 of the computers I try running the launcher on, it launches fine, and the address is passed properly. On one of those two, a second window is opened with a garbage string passed as the URL. On the other computers I tried it on, a garbage string is passed, and the browser launches, and tries to open the window with that garbage string as the URL.

What the fuck is going on here?










[I wish they had just let me put the database up on their website to begin with, password protected it, etc - but nooooo, I had to completely alter my plans because they are paranoid about being hacked, and THEN AFTER committed to my current plan, they do an about face and gave me the option to go back to my original plan. >_< PROTIP: NEVER WORK FOR YOUR 'RENTS, too fucking frustrating.]
This post has been edited by Travelsonic: 01 October 2013 - 12:11 PM

#7 User is offline SeanieB 

Posted 04 October 2013 - 09:31 PM

  • errno -1 (Not system error)
  • Posts: 433
  • Joined: 26-February 08
  • Gender:Male
  • Location:San Diego, CA
  • Project:Fixing Sonic Retro
  • Wiki edits:12

View PostTravelsonic, on 01 October 2013 - 12:09 PM, said:

New issue.

So I made it so on file server [s], xampp resides, and each computer will have a shortcut to a launcher that runs Xampp, and the appropriate browser - and when the browser is closed stops xampp. I coded this in C++.

I decided to go a slightly convoluted way of getting the computer's IPv4 address [as the argument passed when launching the browser] - getting the data from running ipconfig, dumping it to a text file, reading it, and grabbing just the line with the IP address, and using that. I went this way because I'm fucking sick of this project, just want it done hacking together what I already know regarding creating processes, running programs w/ arguments passed, instead of wasting time learning new things like winsock [considering how I am passed my deadline already - and my 'rents, whom I'm programming this for, want it done. >_< ].

On at least 2 of the computers I try running the launcher on, it launches fine, and the address is passed properly. On one of those two, a second window is opened with a garbage string passed as the URL. On the other computers I tried it on, a garbage string is passed, and the browser launches, and tries to open the window with that garbage string as the URL.

What the fuck is going on here?










[I wish they had just let me put the database up on their website to begin with, password protected it, etc - but nooooo, I had to completely alter my plans because they are paranoid about being hacked, and THEN AFTER committed to my current plan, they do an about face and gave me the option to go back to my original plan. >_< PROTIP: NEVER WORK FOR YOUR 'RENTS, too fucking frustrating.]


Apache has built in blocking with mod_access, but you have to add a .htaccess file or edit the apache virtual host config your site is behind, for instance (in the virutalhost):

there should already be a line like the top one somewhere:
<Directory / (or wwwroot or public_html)>
# tell apache to deny users first, allow based on rules
order deny,allow
# allow from every IP from 192.168.0.1 - 192.168.255.255 (I think)
allow from 192.168.0.1/8
# deny everyone else
deny from all
# if you want a special error page
ErrorDocument 403 /403.htm
</Directory>



Inside a .htaccess drop the <Directory> tag. This will only allow hosts from the range you specify, reverse it to specifically deny ranges. Make sure your range is in CIDR notation, use a subnet calculator if you don't know what to do.

I work in systems adnimistration and own a web hosting company, so feel free to PM me if you're still stuck.

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users