Site not loading when not using localhost
Permalink
Howdy,
I have a LAMP stack running on my laptop, as well as another LAMP on a different laptop, both on the same network. I have a C5 site on each of them, and they both run properly when going to localhost in a browser.
If I go to serverB's C5 site from serverA in a browser, I end up at the localhost of serverA (viewing its C5 site). Thing is, if I go to serverB's /phpmyadmin page from serverA it loads properly (as serverB's /phpmyadmin page). Also, I can easily set up a simple none-C5 site on each server and they load properly when being accessed from the opposite server. Is this issue a C5 one, or should I presume it's something to do with apache?
I'm gonna try some other things to fix what's going on, but if there are any ideas/past experiences coming to mind I'm up for suggestions!
Cheers,
-Landson
I have a LAMP stack running on my laptop, as well as another LAMP on a different laptop, both on the same network. I have a C5 site on each of them, and they both run properly when going to localhost in a browser.
If I go to serverB's C5 site from serverA in a browser, I end up at the localhost of serverA (viewing its C5 site). Thing is, if I go to serverB's /phpmyadmin page from serverA it loads properly (as serverB's /phpmyadmin page). Also, I can easily set up a simple none-C5 site on each server and they load properly when being accessed from the opposite server. Is this issue a C5 one, or should I presume it's something to do with apache?
I'm gonna try some other things to fix what's going on, but if there are any ideas/past experiences coming to mind I'm up for suggestions!
Cheers,
-Landson
Hey!
We have a similar setup to what you are describing at the office. Each computer has a lamp stack and we view the content of each by ip. I believe what you need to do is change your config/site.php to reflect the ip address of the computer not localhost. For example, lets say laptop 1 with a concrete install's ip address is 192.168.1.50, make the ip address your BASE_URL. Now lets say laptop 2 has an ip address of 192.168.1.51, make this the BASE_URL for concrete install's on that computer. Now from computer 1 you can view the concrete install on computer 2 by typing 192.168.1.50/your_concrete_install/ and visa versa.
Hope this helps.
We have a similar setup to what you are describing at the office. Each computer has a lamp stack and we view the content of each by ip. I believe what you need to do is change your config/site.php to reflect the ip address of the computer not localhost. For example, lets say laptop 1 with a concrete install's ip address is 192.168.1.50, make the ip address your BASE_URL. Now lets say laptop 2 has an ip address of 192.168.1.51, make this the BASE_URL for concrete install's on that computer. Now from computer 1 you can view the concrete install on computer 2 by typing 192.168.1.50/your_concrete_install/ and visa versa.
Hope this helps.
Thanks a ton guys! I wasn't aware that that file needed to be changed. You saved me so much time, thanks again!
C5 will redirect to whatever you have there.
On my local network I use host files but you may want to set this to the machine local ip. This is probably something like 192.168.1.4 or something similar. If you do this you might want to set them to static ip's so that they don't change when you reboot etc.