Apache...and Virtual Hosts
P@nos
ngeorg at nxmail.gr
Thu Nov 18 18:48:55 EET 2004
[snip]
>
> To ServerName to vazeis giati mesa sto http request symperilamvanetai
> kai ayto. Me ayto ton tropo 3erei o apache apo pio directory 8a sou
> servirei selides. Etsi an gia paradeigma exeis thn parakatw dhlwsh:
>
> <VirtualHost 192.168.1.200>
> ServerName www.myvirtualhost.gr
> DocumentRoot /var/www/virtual/www.myvirtualhost.gr
> </VirtualHost>
>
> 8a dei o apache to ServerName kai 8a sou servirei tis selides pou
> vriskontai mesa sto directory /var/www/virtual/www.myvirtualhost.gr.
xmm h ego den to ekshghsa sosta h esu den to epiases...
Milao gia to ServerName sto main server...oxi se virtual host...
pes oti den exo sthsei katholou virtual host. an o client pesei pano ston
server (eite apo apanthsh tou dns eite giati to /etc/host ton kateuthinei
pano ston apache server) o apache tha serbirei tis selides tou DocumentRoot
tou main server... giati thelei to ServerName ston main server?
Na to po kai allios
esto o client exei sto etc/host to ekshs
192.168.0.100 www.server1.gr
192.168.0.100 www.server2.gr
o xrhsths tou client eite zhthsei www.server1.gr eite zhthsei www.server2.gr
tha pesei pano sthn ip tou server (192.168.0.100) kai o apache ekei tha
dosei to periexomeno tou DocumentRoot....poios o logos gia to ServerName
ston main server? (nomizo egina kourasthkos;p)
>
> > 2) esto dhlono os virtual host to parakato
> >
> > <VirtualHost 192.168.1.200>
> > ServerName www.myvirtualhost.gr
> > # Other directives go here
> > </VirtualHost>
> >
> > giati xreiazetai kai to NameVirtualHost ?? den tha eprepe auto na
> > paizei...tou leei hdh oti an sou zhthsoun to tade servername kai skasei
> > sthn tade ip (192.168.1.200) apanta....
>
> To NameVirtualHost xreiazetai giati yparxei kai to ip based hosting. Sth
> deyterh periptwsh xreiazesai diaforetikh ip gia ka8e hosting pou
> filo3eneis. Mporeis vevaia na exeis kai ta 2 mazi(1 ip gia ola ta name
> based kai apo 1 ip gia ka8e ip based).
xmm tora mallon de se epiasa ego...den tha mporousa gia ip based hosting na
paiksei to parakato??
<VirtualHost 192.168.1.100>
ServerName www.myvirtualhost100.gr
# Other directives go here
</VirtualHost>
<VirtualHost 192.168.1.200>
ServerName www.myvirtualhost200.gr
# Other directives go here
</VirtualHost>
P at nos
More information about the Linux-greek-users
mailing list