logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Redirecting from local machine host to another URL
Author
Rivian



Joined: 19 Aug 2016
Posts: 1
Location: Tbilisi

PostPosted: Fri 19 Aug '16 16:57    Post subject: Redirecting from local machine host to another URL Reply with quote

Apache /2.2.15 (UNIX)
OS: RHEL 6.4


Greetings, Newbie here. I want to do next:
When I Type virtual machines (IP adress: 172.30.12.12) name let's say rivian in browser address bar must appear site hosted on 172.30.12.164:8080/x/x.xhtml and in address bar still needs to be written Rivian instead of 172.30.12.164:8080/x/x.xhtml

How to do it? Where to start? What do i need to google?
Back to top
mraddi



Joined: 27 Jun 2016
Posts: 152
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Tue 23 Aug '16 23:59    Post subject: Redirecting from local machine host to another URL Reply with quote

If I got you correctly you want to run apache on 172.30.12.12 as a reverse proxy for the machine 172.30.12.164?
mod_proxy and/or mod_rewrite are the things you might need to use on the 172.30.12.12-box

Maybe something like this (not tested yet - need to enable mod_rewrite within apache's config) should proxy all requests to the subdirectory /x/ of server 172.30.12.164 running on port 8080:
Code:
RewriteEngine on
RewriteRule "^(.*)"  "http://172.30.12.164:8080/x/$1" [P,L]


But: many ways lead to Rome... Wink so there might be other ways of doing it.
Back to top


Reply to topic   Topic: Redirecting from local machine host to another URL View previous topic :: View next topic
Post new topic   Forum Index -> Apache