ajoo Posted October 17, 2014 Share Posted October 17, 2014 (edited) Hi all, I have a networking issue. I'll define the problem. I have two computers home networked via a wifi modem cum router. One is a laptop with windows 7 and the other is a windows XP machine. The home network works fine. I am able to view the shared files of each of the computers from the other one. Now I have a xampp server running on the window 7 laptop as a localhost. The localhost runs just fine. I am able to access my local website from my laptop. However I want to use the windows XP machine to access the website being served by the windows 7 laptop via the home network. Windows7 laptop(server) ----- WindowsXP machine(client) ip4 add ----------------------------- ip4 add 192.168.2.107 --------------------- 192.168.2.107 Please can someone guide me on this. What all changes would I need to make in the configuration files and all such details. Thanks all Edited October 17, 2014 by ajoo Quote Link to comment https://forums.phpfreaks.com/topic/291892-how-to-access-xampp-server-on-a-local-home-network/ Share on other sites More sharing options...
Ch0cu3r Posted October 17, 2014 Share Posted October 17, 2014 If the two computers are on the same network you shouldn't need to configure anything. On the XP laptop instead of accessing http://localhost you'd use the Windows 7 laptops LAN address, eg http://192.168.2.107 If you dont want to keep typing the IP address you can add an entry to Windows hosts file and alias the Windows 7 IP address to a hostname. eg 192.168.2.107 localhost.win7 You can then use http://localhost.win7/ to access the site on the Windows 7 laptop. Quote Link to comment https://forums.phpfreaks.com/topic/291892-how-to-access-xampp-server-on-a-local-home-network/#findComment-1494027 Share on other sites More sharing options...
ajoo Posted October 17, 2014 Author Share Posted October 17, 2014 Hi, Thanks for the reply. I just tried as you suggested (http://192.168.2.107/xampp from the windows XP machine) and I got an error page saying that this is the new xampp security feature and that only a computer on a local network can access the page. Strangely I am trying to access the page from a local network !?? It further said that the setting could be modified in httpd-xampp.conf. It also gave a 403 error. I am sorry but I am unable to copy and send the exact page right now. I'll try and see if I can send the exact page later. Meanwhile suggest further. Let me know if any further input is required from me. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/291892-how-to-access-xampp-server-on-a-local-home-network/#findComment-1494039 Share on other sites More sharing options...
Ch0cu3r Posted October 17, 2014 Share Posted October 17, 2014 (edited) Try adding the following in the httpd-xampp.conf file Require ip <ADD YOUR WINDOWS XP LAPTOP LAN IP ADDRESS HERE> After this line Require local Save the file and restart the Apache service from the XAMPP control panel. You should now be able to access the xampp homepage from the Windows XP laptop Edited October 17, 2014 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/291892-how-to-access-xampp-server-on-a-local-home-network/#findComment-1494043 Share on other sites More sharing options...
ajoo Posted October 18, 2014 Author Share Posted October 18, 2014 Hi, Thanks again for the reply. I tried making the changes as suggested. Require IP 192.168.2.104 (new ipv4) is not accepted by xampp. The server gives an error once restarted and stops. So I tried instead Allow from 192.168.2, Allow from 192.168.2.104, Allow from 192.168.2.104/8 (seperately) after the Require local and all were accepted since the server started but in all the cases I still got the same error exactly as below : Access forbidden! New XAMPP security concept: Access to the requested object is only available from the local network. This setting can be configured in the file "httpd-xampp.conf". If you think this is a server error, please contact the webmaster. Error 403 192.168.2.104Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11 Please look into it once again and suggest further. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/291892-how-to-access-xampp-server-on-a-local-home-network/#findComment-1494069 Share on other sites More sharing options...
Solution Ch0cu3r Posted October 18, 2014 Solution Share Posted October 18, 2014 Require IP 192.168.2.104 (new ipv4) is not accepted by xampp. The server gives an error once restarted and stops. Make sure you have typed the word IP in lowercase! Any valid IPv4 (or IPv6) address is accepted. I have tested the following and its fine for me. <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> Require local Require ip 192.168.2.104 ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> 1 Quote Link to comment https://forums.phpfreaks.com/topic/291892-how-to-access-xampp-server-on-a-local-home-network/#findComment-1494090 Share on other sites More sharing options...
ajoo Posted October 18, 2014 Author Share Posted October 18, 2014 Hi , Thanks Ch0cur3, yes it has worked. The small caps ip did the trick. and I tried so may combinations but i guess I missed playing with the CASE. I did also get it to work with "Require all Granted" But I was looking to give selected access just like you showed me. Thanks again !! I will have some more follow up questions and would be back again later. Thanks again ! Quote Link to comment https://forums.phpfreaks.com/topic/291892-how-to-access-xampp-server-on-a-local-home-network/#findComment-1494092 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.