Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    apache redirect to local url

    Hi All,

    I've following setup in the environment.

    local-host1 - running website available to world (
    local-host2 - running sub-domain-website available to local environment.

    now i want to set apache redirect so that whenever outsite request comes for, 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.


  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    North Carolina
    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
    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.


  4. $spacer_open
  5. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    North Carolina
    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
    Hi Jledhead,

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


Posting Permissions

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