Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Cannot view/edit site on local network

    Hi,
    We recently installed 4 zen cart stores on a dedicated LAMP server.

    Two of them are rebuilds of existing sites we were previously hosting elsewhere (one on 1.5 and one on 1.39)

    Prior to the domains being changed I was accessing them via the server's IP on our LAN. I had the servers in each store's includes/configure.php and MY_ADMIN/includes/configure.php files pointing to this IP address. As soon as we redirected the domain names to our server I changed the configure files so they were pointing to the web addresses.

    Now I can see both sites... but only if I'm not accessing them on the network! Because the IP address of the server is the same as our router, if I type in the url I get diverted to the router's login page.

    I can see the sites by typing in the server's name on the network, but no images are displayed... and the admin pages aren't accessible either. So I assume this is to do with the paths in the configure.php files which I had to change to the stores' web addresses - I can see the other two sites on the server with no problems as they're not yet live.

    I know this is probably something to do with our router rather than Zen Cart itself, but just wondered if anyone else has had this problem and how it can be solved.
    Last edited by igi2011; 17 Feb 2012 at 11:11 AM.

  2. #2
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Re: Cannot view/edit site on local network

    Solved! It's taken me half the morning to find this, posting the solution in case it helps somebody else out.

    Find the "hosts" file (there's no extension) on the computer you want to access the sites - on Windows it's in C:\windows\system32\drivers\etc\hosts
    on Linux it's etc/hosts

    and add the following lines:

    192.168.0.x www.mydomain1.com
    192.168.0.x www.mydomain2.co.uk
    192.168.0.x www.mydomain3.net

    where 192.168.0.x is the internal IP address of your server.

    You'll need to do this for every computer on your LAN that you want to view the sites.

    See http://brisray.com/comp/cwserver2.htm for more information.

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Cannot view/edit site on local network

    Quote Originally Posted by igi2011 View Post
    Solved! It's taken me half the morning to find this, posting the solution in case it helps somebody else out.
    Firstly, let me congratulate you on finding a solution.

    Now, if you don't mind me saying, there is a better way, that doesn't require you to modify the hosts file for every computer on the LAN. Set up your own local DNS It only needs to be authoritive for your LAN clients and it can also act as a caching server. This will not only avoid the need to edit the hosts files, but will also provide a measurable performance increase (and reduction in data usage) for most network related activities.

    Local DNS servers are pretty much a one click installation these days.

    Oh, I followed the link to the website that you gave, and need to state that a lot of the stuff on that page is either incorrect, outdated, or simply bad practice.

    For example. the use of "*" wildcard for host entries. Very bad practice with known exploits.

    There is talk of how to setup and run a server on dynamic IP address, with no mention that SSL is impossible with such a scenario.

    Comments such as "Windows 2K just got glitchy over time" (shows not only how dated this page is, but implies that "glitches" are somehow "time" related and anyone that knows how a computer works will know how silly this concept is)

    It also perpetuates 'common misinformation', such as
    "It can take up to 72 hours for the IP address to be propagated throughout the Internet, but I usually find it's done in a couple of hours", which shows the author doesn't understand nameserver delegations or TTL settings.

    Anyway I once again congratulate you on finding a workable solution (there are also other solutons, such as proxy servers and DMZ's) but these tend to be a little more difficult to configure.

    Without knowing your business requirements I can't say what will be best for you, but if/where possible, I tend to steer people towards the use of a DMZ solution (better security), often in conjunction with the DNS and/or Proxy solutions.

    Cheers
    Rod

  4. #4
    Join Date
    Oct 2011
    Location
    Kent, UK
    Posts
    50
    Plugin Contributions
    0

    Default Re: Cannot view/edit site on local network

    Thanks for the helpful suggestion Rod - I'm very new to Linux but will certainly have a look at installing a local DNS.
    Cheers
    Lee

 

 

Similar Threads

  1. v154 Cannot access install on local serveraccross local network.
    By RMPowell01 in forum Installing on a Windows Server
    Replies: 5
    Last Post: 15 Jan 2015, 06:08 PM
  2. Replies: 1
    Last Post: 10 Dec 2010, 08:40 PM
  3. Cannot access zencart over local network
    By bikerlee in forum Installing on a Mac Server
    Replies: 4
    Last Post: 16 Nov 2007, 12:11 AM
  4. cannot view product list after site was hacked
    By SarahL in forum General Questions
    Replies: 2
    Last Post: 24 Jul 2006, 05:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg