How to solve: Domain redirects to router when browsing from local lan

Discussion in 'Apache' started by MrCalc, Dec 18, 2007.

  1. #1
    I could need some help to figure out if this is at all possible.

    Setup:

    apache server running wordpress site.
    Domain name pointed to ip of router.
    Port 80 forwarded to apache server on router.

    Everrthing works perfect, except I can't manage / admin / browse the site from within the lan.

    When I try to browse localhost on the server the site(wordpress) will redicrect to the domain name.
    Meaning it will access the ip(inet) and that brings up the routers config / login page.

    I guess this is the typical problem with most hobby routers. When accessing my IP(inet) it will show the routers Login page.

    Is it possible to avoid this somehow. I was thinking mayby with the host file on server, so I atleast could manage the admin page when browseing it from the server.
    Of course without breaking the current working setup..
     
    MrCalc, Dec 18, 2007 IP
  2. MrCalc

    MrCalc Active Member

    Messages:
    385
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Never mind, fixed it with the host file ;-)
     
    MrCalc, Dec 20, 2007 IP
  3. ndreamer

    ndreamer Guest

    Messages:
    339
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    instead of using localhost you can use the internal lan ip address of that server.
     
    ndreamer, Dec 20, 2007 IP
  4. MrCalc

    MrCalc Active Member

    Messages:
    385
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    80
    #4
    I just associated the domain with 127.0.0.1 in the host file ;-)

    Works like a charm
     
    MrCalc, Dec 21, 2007 IP