Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-06-25 12:27:20
- Charlie Chalk
- Member
- Registered: 2005-09-06
- Posts: 51
accessing localhost site from same LAN and magical disapearing images!
Hi
I’ve a Win XP Home PC that I use for developing websites. It runs a LAMP setup.
I currently have a site in production which uses textpattern, I have everything installed and running perfectly on my Win XP Home PC.
I also have a ibook laptop which I use for testing my sites for Mac compatability, and here is where I have a slight problem…
When I view the textpattern site over the network (enter the IP address of the WinXP PC) it apears exactly as you’d expect apart from the images that are in the ‘images’ tab within textpattern.
I have several images that are linked to by ‘img’ tags within the site code (i.e. they do not apear in the textpatter ‘images’ tab) these showup without any problems. It’s only the images that DO apear in the textpattern ‘images’ tab that don’t show up.
When I look at the path Safari is showing for these images, the non-textpattern images are 192.168.1.100/images/logo.jpg and the textpattern images are localhost/images/fooba.jpg.
So it’s not putting in the IP address, can anyone tell me what I’ve done wrong for this to happen?
Any help would be appreciated.
CC
Offline
Re: accessing localhost site from same LAN and magical disapearing images!
Charlie,
In order to avoid problems like these, I give my internal network a domain name and each machine has it’s own unique name and IP address. DHCP is reserved for visiting laptops.
On Windows XP: C:\WINDOWS\systems32\drivers\etc\hosts
On Linux: /etc/hosts
On a Mac: ?
With this setup, when I install a PHP app, I give it a qualified machine name, rather than localhost or an IP address.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#3 2006-06-25 18:56:39
- Charlie Chalk
- Member
- Registered: 2005-09-06
- Posts: 51
Re: accessing localhost site from same LAN and magical disapearing images!
hmmm I’ve found the hosts file and made the change to 127.0.0.1 which works fine on my PC. The mac on the other hand says it cand find the host.
Do I have to add the Win XP’s IP address to the Mac hosts file along with the domain name?
CC
Offline
Re: accessing localhost site from same LAN and magical disapearing images!
Yes, each machine’s host file should be the same.
127.0.0.1 localhost
192.168.1.1 gateway.chalk.com
192.168.1.10 winxp.chalk.com
192.168.1.11 ibook.chalk.com
This is a just an example but gives you an idea of how you can layout your internal network. Now when you install Textpattern or any other app, you would use the name of the machine instead of it’s IP in the installation screens. Then you access the machine like http://winxp.chalk.com from your internal network.
In the Apache httpd.conf: ServerName winxp.chalk.com:80
If you ever decide to open things up to the outside world for family and friends access, check out DynDNS.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline