[solved]Accessing folders under htdocs over LAN

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

[solved]Accessing folders under htdocs over LAN

Postby sylvia » 27. March 2012 16:44

Issue:
In order not to have to transfer my development files back and forth between the real and the VPC to check them with different browsers, I try to access the VPC's htdocs folder from the real PC or vice versa. Everytime I get an "Object not found!" message in the browser window. The strange thing is, that the Firefox displays the htdocs' favicon icon in the address bar, which indicates to me that the object was found somehow (the behaviour is retracable by removing and restoring the icon file). On the page with the "Object not found!" message it also says "Error 404", followed by a link with the title of the calling PC's name or IP (depending on what I used). Following that link brings me to the XAMPP's start page (Welcome), Firefox and IE behave identical.
There is always only one Apache running at a time, and there is no connection to the Internet (modem is turned off).

What I entered in the address bar of the browser:
LAN-name-of-PC/localhost/development-folder
LAN-name-of-PC/127.0.0.1/development-folder
LAN-PC-IP/localhost/development-folder
LAN-PC-IP/127.0.0.1/development-folder
development-folder being a subfolder to htdocs.
It doesn't matter if development-folder has any php of htm file or not.


What else I tried, but didn't do the trick :
I followed Sharley's suggestion (thread http://community.apachefriends.org/f/viewtopic.php?f=16&t=50213&sid=749eb9047d8347c8da8c8428be822d73) to check the windows\system32\drivers\etc\hosts file, where I found "127.0.0.1 localhost" already entered.
I added "Allow from add hisip here" following Sharley's suggestion in thread http://community.apachefriends.org/f/viewtopic.php?f=16&t=50227&sid=749eb9047d8347c8da8c8428be822d73 (I did not forget to restart the Apache)
Except for my development files, I also removed all files and folders underneath the htdocs folder.

I did all these steps separately as well as in combination.


What does work is LAN-PC-IP/xampp or LAN-name-of-PC/xampp (but from the opened XAMPP start page I cannot access my development files).
I also have access to phpMyAdmin, not only from the XAMPP start page, but also over /phpmyadmin (is case-sensitive, as I just found out).

Now I reached a dead end. Any ideas, suggestions, solutions?

Kind regards
Sylvia

My system:
Real PC: Windows XP SP2, Firewall "ZoneAlarm" (deactivated), AntiVir, XAMPP 1.7.7, Firefox 11.0, IE 6.0
Virtual PC: VPC2007 with Windows XP SP2, no Firewall, no anti virus, XAMPP 1.7.4, Firefox 4.01, IE 7.0
Both PCs are connected via LAN with fixed IP addresses.
Both XAMPP setups are in the root of their respective drives, both setups were done by extracting the ZIP files. No part of the XAMPP is set up as a service.
sylvia
 
Posts: 7
Joined: 27. March 2012 16:28
Operating System: various

Re: Accessing folders under htdocs over LAN

Postby Altrea » 28. March 2012 04:08

sylvia wrote:The strange thing is, that the Firefox displays the htdocs' favicon icon in the address bar, which indicates to me that the object was found somehow

That's not surprising for me. The request was received by your LAN-PC Apache. Because the favicon is saved in the root directory of your LAN-PCs Apache it is sended out.
But the URL(s) you are trying are completely incorrect. Thats why your Apache is sending back an HTTP status error code 404.

sylvia wrote:LAN-name-of-PC/localhost/development-folder
LAN-name-of-PC/127.0.0.1/development-folder
LAN-PC-IP/localhost/development-folder
LAN-PC-IP/127.0.0.1/development-folder

You missed just one peace of knowledge.
127.0.0.1 is just a replacement for the own IP-Adress of the PC you are sitting in front of.
localhost is just a replacement for the own Computername of the PC you are sitting in front of.
They are just loopbacks to the very own system.

So, the only thing you have to do is, if you have a specific IP-Adress or Computername you want to request in LAN, you don't need a replacement/loopback for them.
=>
Code: Select all
http://IP-or-Computername-of-your-LAN-PC/development-folder/


best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Accessing folders under htdocs over LAN

Postby sylvia » 28. March 2012 16:43

Hi Altrea,

thank you very much for your fast response, and it really helped me.
You were right, I was indeed missing a piece of knowledge (or, as you put it, a "peace" :-)).

I always thought that 127.0.0.1 or localhost is an internal address for htdocs in a running Apache server environment and not for PC I am sitting in front of.

You can mark this thread as solved. Thanks again.

Kind regards
sylvia
sylvia
 
Posts: 7
Joined: 27. March 2012 16:28
Operating System: various

Re: [solved]Accessing folders under htdocs over LAN

Postby Altrea » 28. March 2012 18:28

Hi sylvia,

I'm glad that you could solve your issue.
Thank you very much for your feedback.
Your thread is now marked as solved.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 34 guests