Find the answer to your Linux question:
Results 1 to 5 of 5
Hi All, I've following setup in the environment. local-host1 - running website available to world ( Xxx.org ) local-host2 - running sub-domain-website available to local environment. (test.xxx.org) now i want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2004
    Posts
    7

    apache redirect to local url


    Hi All,

    I've following setup in the environment.

    local-host1 - running website available to world (Xxx.org)
    local-host2 - running sub-domain-website available to local environment.
    (test.xxx.org)

    now i want to set apache redirect so that whenever outsite request comes for test.xxx.org, it redirects to local-host2 webserver.

    I already configured subdomain in dns which is coming to local-host1 currently.

    I tried using redirect and rewriterule, but it didn't work for internal url hosting on other server.

    Any help/idea would be appreciated.

    thanks
    ~N

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    are you trying to proxy it or redirect? and is local-webserver accessible from the outside?

    it sounds like you want to proxy but please clarify

  3. #3
    Just Joined!
    Join Date
    May 2004
    Posts
    7
    i tried to redirect it and also tried using rewrite rule. local-webserver not accessible from the outside. it is available to local network only.

    rewrite rule works fine if i specify external site.

    thanks..

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    if you are trying to make it available externally but its not exposed to the outside world, redirecting to it or rewriting the url is not going to change that. you need to proxy it
    lots of good links here
    apache reverse proxy - Google Search

    that way your externally accessible apache is still the only one directly exposed to the outside world

    its not very difficult either and improves security

  6. #5
    Just Joined!
    Join Date
    May 2004
    Posts
    7
    Hi Jledhead,

    Reverse proxy worked perfectly. Thanks very much for the tips.
    i really appreciate it.

    thx
    ~N

Posting Permissions

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