Sharing one localhost with LAN

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

Sharing one localhost with LAN

Postby wannamartin » 17. March 2010 23:52

We need to share the XAMPP installation over our LAN via web browsers. Let me explain:

We have Joomla 1.5 CMS installed on our XAMPP production server machine which is acting as the server for the Joomla web site. That part works fine locally. Others on the LAN that need to work on the Joomla files can enter the IP address of the localhost computer and get to the Joomla web site without problems. The difficulty comes when we try to "administer" the Joomla built web pages via an administrator web browser interface, which is naturally embedded within the Joomla file system.

On the localhost computer system, we can access and administer the files of the web site without problems by entering http://localhost/websitename/administrator into the web browser. We get the admin login screen and can gain access to the files and work with them normally.

However, on any other LAN computer, we can access the web site by entering the IP of the localhost computer into the browser. We enter http://192.168.5.199/websitename/administrator, and we get the login screen and can gain access to the admin files. But if we try to change anything and then save the changes, the browser automatically changes one part of the URL from 192.168.5.199 to localhost, and the browser loses its connection to the actual localhost computer and the session terminates.

If you can help, please tell us how do you tell the LAN computer's browser (which doesn't have XAMPP installed) that it should either stay connected to the 192.168.5.199 computer, or else that its localhost settings are assigned or pointing to 192.168.5.199 instead?

Please remember that our understanding is a basic level of networking and Apache.

Thanks Everyone!
wannamartin
 
Posts: 6
Joined: 17. March 2010 22:30

Re: Sharing one localhost with LAN

Postby 2potatocakes » 30. April 2010 10:50

Not sure if you're still experiencing the same problem but if you are. Try this:

On the computer you are regarding as localhost

1 : Go To Control Panel
2 : Then Select Windows FireWall
3 : select Tab "Exceptions"
4 : Add Port
5 :In Name write 'iis' or 'Localhost' and In Port number write '80'

Don't know if it'll work but give it a shot
2potatocakes
 
Posts: 2
Joined: 30. March 2010 22:33

Re: Sharing one localhost with LAN

Postby wannamartin » 30. April 2010 14:53

Thank you. I will try that. We have been able to access the localhost by entering http://computername-or-IP/ in the LAN computer's browser to see the site in the localhost htdocs folder, or we append the name of the folder if the site is not in the root. We have to be careful to not use absolute links or paths when making links and images on the local host computer, as that adds the http://localhost/ to the url, and the other computers on the LAN show broken images or 404 links in the browser. So we only use relative paths and links.
wannamartin
 
Posts: 6
Joined: 17. March 2010 22:30

Re: Sharing one localhost with LAN

Postby JonB » 30. April 2010 17:09

here's an explanation of localhost.

EVERY networked computer considers ITSELF to be localhost (under most OS's default installation). Windows machines have a 'hosts' (no extension) file in the c:\windows\system32\drivers\etc folder that makes one definition (as default)

localhost 127.0.0.0

This is also known as the loopback address.

you can EITHER makes hosts entries on each machine for a 'friendly name' for the machine that has Joomla installed

like:
joomla-host 192.168.5.199

the rules for host-names are the same as for Internet domain names bascially, as it is going to provide/resolve this name for any machine with that entry. This tells the browser (and DNS) on each machine where to find that address.

then you could use http://joomla-host locally (on your LAN). Anything more will need a Domain Name registration or a fixed/static IP on the internet.

I think this is they key: You likely need a joomla parameter fix. its likely that joomla thinks the server name is localhost from setup. that's probably why Joomla wants to navigate back there.

check this out:

http://help.joomla.org/content/view/39/132/

You will want to change the URL either to the local fixed IP address; 192.168.5.199 or a 'local friendly name'.

Good Luck.
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 33 guests