Link to home
Start Free TrialLog in
Avatar of thaimin
thaimin

asked on

Setup virtual host to look at different computer

I might be going about this the wrong way, but....

Is there a way to setup a virtual host to grab documents from another web server?

So, I have the address popcorn.hopto.org, and when that address is given, then apache should get the documents at 192.168.0.101, but I do not want a redirect (it is impossible since the other computer is only visible on the local network).

All other virtual hosts should look at the same (default) document folder though.
SOLUTION
Avatar of periwinkle
periwinkle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thaimin
thaimin

ASKER

okay......so i kind of looked that over, can you give me any help on setting it up? I'm not very good with apache (I use an XAMPP distribution). I know about editing the HTTPD.conf file, i really dont know how, but I'm guessing all the directives they are talking about go in there.
I'm sorry - I don't really have much experience with mod_proxy, but wanted to point you in the right direction... hopefully someone else will chime in!
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, Phil - Glad someone was there to step in with experience!
that's what we're here for, i figured that out with help from other on this site too,  let's just hope it helped and i didn't forget anything...
Avatar of thaimin

ASKER

Okay, it works very nicely, and even has taught me how to setup normal virutal hosts.

I have one more question. Is it possible to use the proxy to look at a directory of an internal serval? This what I tried:

#RPA (proxy)
<VirtualHost *:80>
    ServerAdmin xxx@yyy.com
    ServerName rpa.hopto.org
    CustomLog logs/rpa-combined_log combined
    ProxyPreserveHost On
    ProxyPass / http://192.168.0.100:80/rpa
</VirtualHost>

Basically, I want it when you go to http://rpa.hopto.org/ it to read from http://192.168.0.100:80/rpa. What ends up happening though is that it redirects the page to http://rpa.hopto.org/rpa/ and displays "The Object cannot be found"
i don't think it possible because of the nature of what you're trying to do.  an http request comes in like
GET /somefile.html HTTP/1.1
Host: somehost.com

when your external server gets it, it passes it to 192.168.0.100.  the problem is, when the internal server gets it, it takes the HOST and the REQUEST and adds them together as "somehost.com/somefile.html"

the 192.168.0.100 isn't part of the http request, its just a location to pass the request onto.

that's my 2 cents anyway

Avatar of thaimin

ASKER

well, thanks anyways. i didnt really need that part necessarily. thanks for all of the other help.
I'm glad that things are progressing for you - thanks for the kind assist - Phil really did most of the work!
its all good, i'd only be upset if it was the last day of the month and the points he gave you cost me my free membership :)

funny thing about us computer nerds, we actually enjoy helping others...
lol - true, true, it's not about the points, is it. ;)
Avatar of thaimin

ASKER

well, you did help. phil didnt tell me i had to include all the modules for the proxy pages, and the website you gave me, thats about the only thing i got out of it :-).
yeah, i didn't know if i had remembered everything, i did it once about a month ago.  i looked back through my httpd.conf file and that was all that stuck out to me.  

but i would looked a little harder if i could have gotten a few more points, geez...
Avatar of thaimin

ASKER

well, actually, im basically out....thats why it was so little....usually i give 500, but giving that much in the past has taken its toll
lol, i was joking.
thaimin - I think Phil was making a joke about my comments about "it's not about the points" - perhaps a smiley would have made it a little more apparent, but no negativity was meant :)
Avatar of thaimin

ASKER

oh, okay :-)