Jump to content

Recommended Posts

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 by ajoo

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. 

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.

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 by Ch0cu3r

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.104
Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11

 

 

 

 Please look into it once again and suggest further. Thanks 

  • Solution

 

 

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>
  • Like 1

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 !

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.