View previous topic :: View next topic |
Author |
Message |
.:chrome:. Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1738078993454a825c7608f.jpg)
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Sat Feb 19, 2005 9:56 pm Post subject: root del web nella LAN |
|
|
io dispongo di un webserver all'indirizzo bla.net, che fa anche da gateway per una LAN.
posso, con qualche direttiva di apache, fare in modo che all'indirizzo host.bla.net risponda una macchina interna alla LAN stessa? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Sat Feb 19, 2005 10:08 pm Post subject: |
|
|
Devi usare iptables assieme al DNAT. _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
.:chrome:. Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1738078993454a825c7608f.jpg)
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Sat Feb 19, 2005 10:13 pm Post subject: |
|
|
gutter wrote: | Devi usare iptables assiame al DNAT. |
ok. quella è una possibilità, ma (forse non mi sono spiegato bene) io voglio che il gateway esporti il suo bel web sulla porta 80 standard, e voglio che anche la mia macchina nella LAN usi la suddetta porta 80. con il DNAT posso mappare le richieste ad una porta privilegiata disponibile sulò gateway sulla mia macchina secondaria e questo già lo faccio.
speravo di poter "inserire" il web della mia macchina secondaria su un dominio di livello inferiore a quello della macchina che fa da gateway |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
randomaze Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/191195238462262e08ea92.jpg)
Joined: 21 Oct 2003 Posts: 9985
|
Posted: Sat Feb 19, 2005 10:15 pm Post subject: |
|
|
k.gothmog wrote: | speravo di poter "inserire" il web della mia macchina secondaria su un dominio di livello inferiore a quello della macchina che fa da gateway |
Configurando apache come reverse proxy dovresti riuscire... _________________ Ciao da me! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Sat Feb 19, 2005 10:20 pm Post subject: |
|
|
Ma in questo modo potrebbe mantenere un dominio li e uno di più basso livello su un altro server all'interno della lan? _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
randomaze Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/191195238462262e08ea92.jpg)
Joined: 21 Oct 2003 Posts: 9985
|
Posted: Sat Feb 19, 2005 10:27 pm Post subject: |
|
|
gutter wrote: | Ma in questo modo potrebbe mantenere un dominio li e uno di più basso livello su un altro server all'interno della lan? |
Si... anche se in realtá non ho mai provato sui sottodomini.
in generale con un reverse proxy puoi far puntare www.gutter.it a localhost, www.gutter.it/pippo alla macchina pippo.lan porta 8080 e cose simili. _________________ Ciao da me! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
.:chrome:. Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1738078993454a825c7608f.jpg)
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Sat Feb 19, 2005 10:29 pm Post subject: risolto: |
|
|
randomaze wrote: | in generale con un reverse proxy puoi far puntare www.gutter.it a localhost, www.gutter.it/pippo alla macchina pippo.lan porta 8080 e cose simili. |
ok. grazie mille a tutti e due. è proprio quello che faceva al caso mio |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Sat Feb 19, 2005 10:31 pm Post subject: |
|
|
Interessante
Io come al solito avrei risolto con iptables, ma questa soluzione è più interessante nel caso incui i sottodomini siano molti. _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
.:chrome:. Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1738078993454a825c7608f.jpg)
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Sat Feb 19, 2005 10:33 pm Post subject: |
|
|
gutter wrote: | Interessante
Io come al solito avrei risolto con iptables, ma questa soluzione è più interessante nel caso incui i sottodomini siano molti. |
più che altro, con netfilter/iptables non avrei potuto mettere i due web in ascolto sulla porta 80. avrei dovuto necessariamente assegnare alla macchina secondaria una porta diversa, come sto facendo adesso, che uso la porta 81 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Sat Feb 19, 2005 10:57 pm Post subject: |
|
|
k.gothmog wrote: |
più che altro, con netfilter/iptables non avrei potuto mettere i due web in ascolto sulla porta 80. avrei dovuto necessariamente assegnare alla macchina secondaria una porta diversa, come sto facendo adesso, che uso la porta 81 |
Naturalmente Mi sono espresso con i piedi. Pardon ![Wink :wink:](images/smiles/icon_wink.gif) _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
FonderiaDigitale Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/160661570245a62657b3321.jpg)
Joined: 06 Nov 2003 Posts: 1710 Location: Rome, Italy
|
Posted: Sun Feb 20, 2005 1:43 am Post subject: Re: risolto: |
|
|
k.gothmog wrote: | randomaze wrote: | in generale con un reverse proxy puoi far puntare www.gutter.it a localhost, www.gutter.it/pippo alla macchina pippo.lan porta 8080 e cose simili. |
ok. grazie mille a tutti e due. è proprio quello che faceva al caso mio |
puoi anche usare mod_rewrite per riscrivere la URI in locale e farla puntare verso un host/uri interno, ad esempio per puntare /pippo da dentro la direttiva VirtualHost, al webserver interno che ascolta all'ip 1.2.3.4:
Code: |
ReWriteEngine On
RewriteCond %{REQUEST_URI} !^/(pippo.*)
RewriteRule ^/(.*)$ http://1.2.3.4/$1
|
_________________ Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fedeliallalinea Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/161653968057192eb39329f.jpg)
Joined: 08 Mar 2003 Posts: 31461 Location: here
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|