1 |
On Wed, 2005-07-13 at 18:29 -0700, Michael Stewart (vericgar) wrote: |
2 |
> Ow Mun Heng wrote: |
3 |
> > |
4 |
> > Yep.. Mod_rewrite can be used for this. Didn't think of that since I was |
5 |
> > thinking "Proxy" only. |
6 |
> > |
7 |
> > That being said, using mod_rewrite I can rewrite on-the-fly to the |
8 |
> > Nat'ed address. But what if the add has a DNS entry? Say |
9 |
> > |
10 |
> > www.example2.com and www.example1.com both has the same external IP (say |
11 |
> > 10.1.1.1) |
12 |
> > |
13 |
> > but www.example2.com is actually a NAT'ed server inside the firewall and |
14 |
> > behind apache? What then? |
15 |
> > |
16 |
> |
17 |
> If I am understanding you correctly, vhosts should do the trick. |
18 |
> |
19 |
> www.example1.com would be set up like a normal vhost |
20 |
> www.example2.com would be a vhost with just proxy directives in it: |
21 |
|
22 |
So that would be Named based Vhosts? I'm just a bit confused on how we |
23 |
can direct it to the internal Box. (FWIW, it may be serving from |
24 |
Mac/Win) |
25 |
|
26 |
assuming apache: |
27 |
|
28 |
<VirtualHost vhost.home.net> |
29 |
ServerName vhost.home.net |
30 |
ServerAlias www.vhost.home.net |
31 |
DocumentRoot /var/www/vhost.home.net/htdocs |
32 |
TransferLog /tmp/vhost-access.log |
33 |
|
34 |
<Directory "/var/www/vhost.home.net/htdocs"> |
35 |
Options -Indexes -FollowSymLinks MultiViews |
36 |
AllowOverride All |
37 |
Order allow,deny |
38 |
Allow from all |
39 |
</Directory> |
40 |
|
41 |
how do I specify the internal example2.com (say ip 192.168.1.1) |
42 |
Where does the proxy directive go to? |
43 |
|
44 |
Thanks for the help in explaining. |
45 |
> |
46 |
|
47 |
|
48 |
-- |
49 |
Ow Mun Heng |
50 |
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM |
51 |
98% Microsoft(tm) Free!! |
52 |
Neuromancer 09:43:49 up 21:09, 4 users, load average: 1.20, 1.12, 1.47 |
53 |
|
54 |
|
55 |
-- |
56 |
Ow Mun Heng |
57 |
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM |
58 |
98% Microsoft(tm) Free!! |
59 |
Neuromancer 10:26:36 up 21:51, 5 users, load average: 0.86, 0.51, 0.54 |
60 |
|
61 |
|
62 |
-- |
63 |
gentoo-server@g.o mailing list |