httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert L. Harris" <Robert.L.Har...@rdlg.net>
Subject Re: Rewriting a URL
Date Fri, 11 Jan 2002 18:06:53 GMT
Thus spake Joshua Slive (joshua@slive.ca):

> 
> > From: Robert L. Harris [mailto:Robert.L.Harris@rdlg.net]
> 
> > Here's my VHost block:
> >
> > NameVirtualHost site1.company.com
> 
> You appear not to have read the namevirtualhost documentation.  I'd start
> here:
> http://httpd.apache.org/docs/vhosts/name-based.html
> 

On my list for my weekend reading.  I'm still learning what all I have to learn.

> Again, this should be the IP address or "*", not site1.copmany.com.
> 
> >     ServerName          site1.company.com
> >     ServerAdmin         rharris@raindance.com
> >     DocumentRoot        /var/www1/html
> 
> Why do you have a DocumentRoot when no content is served from this site?

Originally there was going to be content in /var/www1/html and if you went to
/var/www1/html/site then it'd redirect ya.


> What you need is to proxy the content through site1.company.com.  That is,
> you need site1 to go grab the content from gonzo1 and return it to the
> client as if it came from site1.  To do this, you need to configure a
> "reverse proxy".  This requires mod_proxy to be included in the server.
> Then you can either use the ProxyPass and ProxyPassReverse directives (for
> simple cases) or the [P] flag to RewriteRule (for complicated cases).
> 
> Because I'm procrastinating, here is what I think you want:
> 
> NameVirtualHost *
> 
> <VirtualHost *>
> ServerName site1.company.com
> ProxyPass / http://gonzo1.company.com/
> ProxyPassReverse / http://gonzo1.company.com/
> </VirtualHost>
> 
> <VirtualHost *>
> ServerName site2.company.com
> ServerAlias site3.company.com
> DocumentRoot /var/www3/html
> </VirtualHost>

While waiting on a reply I stumbled accross mod_proxy and found some of
this.  Yours is still alot simpler than mine.

> 
> Before I go, a couple points:
> 
> 1. This is a quite complicated configuration where many things can go wrong.
> You need to spend some time to read the docs for each of these directives to
> make sure you understand everything.  Don't just copy some example (like the
> one above) and hope it works.

Right now I'm under a time constraint to show that the project will even come
close to working before I can get approval, etc.  This is a small peice of a
very large picture, but a very critical one.  If I can get this sucker humming
I'll have the time and resources to dig alot more.  I think your help has 
given what I need.

> 2. You make everyone's life more difficult by munging your config file.  Is
> the URL really so secret?  I bet I could find it out in 5 minutes if I
> wanted to.  This way, I had to make tons of guesses, rather than knowing
> exactly what was happening.

Not really "that" secret.  I'm testing on internal subdomains.  The server
name is actually considerably longer with 2 dns subdomains in the way.  It
was more of trying to keep it simple.


:wq!
---------------------------------------------------------------------------
Robert L. Harris                |  Micros~1 :  
Senior System Engineer          |    For when quality, reliability 
  at RnD Consulting             |      and security just aren't
                                \_       that important!
DISCLAIMER:
      These are MY OPINIONS ALONE.  I speak for no-one else.
FYI:
 perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message