Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
root del web nella LAN
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sat Feb 19, 2005 9:56 pm    Post subject: root del web nella LAN Reply with quote

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
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sat Feb 19, 2005 10:08 pm    Post subject: Reply with quote

Devi usare iptables assieme al DNAT.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sat Feb 19, 2005 10:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Sat Feb 19, 2005 10:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sat Feb 19, 2005 10:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Sat Feb 19, 2005 10:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sat Feb 19, 2005 10:29 pm    Post subject: risolto: Reply with quote

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
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sat Feb 19, 2005 10:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sat Feb 19, 2005 10:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sat Feb 19, 2005 10:57 pm    Post subject: Reply with quote

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:
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sun Feb 20, 2005 1:43 am    Post subject: Re: risolto: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31461
Location: here

PostPosted: Sun Feb 20, 2005 8:36 am    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-t-288995-highlight-apache.html
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum