Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Server Web] URL---> dir
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
hellraiser
Guru
Guru


Joined: 14 Jun 2003
Posts: 431
Location: Pescara [Italy]

PostPosted: Thu Oct 09, 2003 3:39 pm    Post subject: [Server Web] URL---> dir Reply with quote

allora ho un piccolo server web da finire di configurare...ora vi spiego la mia esigenza da soddisfare :twisted:


Example:

allora in /home/httpd/ ho "gentoo" e "kernel"

queste due dir sarebbero tutte le pagine html di quei due siti....
in modo che possano essere consultate off-line in LAN

ora pero per raggiungere questi due PATH, nel Browser devo scrivere "http://localhost/gentoo/" o "http://localhost/kernel"

mentre io vorrei che semplicemente scrivendo http://www.gentoo.org mi visualizzi quella dir...

come posso fare ??

mi hanno consigliato l'alias, ma penso che non vadi bene...

penso di dover configurare apache, con i virtual hosting e magari configurare i DNS

ke mi dite ??

:twisted:
_________________
Io non sono nessuno...ma nessuno è come me!

"Open Source is a good idea..."
Back to top
View user's profile Send private message
DuDe
Guru
Guru


Joined: 04 Dec 2002
Posts: 314
Location: Roma Italy

PostPosted: Thu Oct 09, 2003 4:38 pm    Post subject: Reply with quote

A mio avviso, lo puoi fare solo se gestisci un tuo dns interno, dovresti crearti una zona gentoo.org cosi' come kernel.org, poi all'interno di queste zone crei un HOST record che contiene l'ip del server che ospita tali mirror, e che sia chiama www, poi nella tua zona ( esempio pippo.com) metti un cname (alias) per www.gentoo.org e per www.kernel.org che puntano alla machina che ospita i mirror.

Altro non mi viene in mente
_________________
mount -t brain /dev/brain /body/skull
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Thu Oct 09, 2003 5:05 pm    Post subject: Reply with quote

Metti l'indirizzo che ti interessa nel file host, e associalo all'indirizzo ip 127.0.0.1
Poi setta ServerName in modo appropriato nel virtualhost di apache.
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
hellraiser
Guru
Guru


Joined: 14 Jun 2003
Posts: 431
Location: Pescara [Italy]

PostPosted: Thu Oct 09, 2003 6:28 pm    Post subject: Reply with quote

allora ho fatto dei piccoli passi in avanti...

allora in vhost.conf ho settato questo

<VirtualHost 192.168.0.1>
ServerName gentoo.inferno.org
DocumentRoot "/home/www/gentoo/"
TransferLog /home/www/logs/gentoo.inferno.org_access
ErrorLog /home/www/logs/gentoo.inferno.org_error
</VirtuaLHost>

Logicamente modificando anke /etc/hosts del mio client-PC sono riuscito a risolvere l'indirizzo e a visualizzare almeno la prima pagina...

pero non è quello che volevo io....
infatti io volevo ottenere qualkosa come www.gentoo.org

così ho provveduto a modificare i suddetti file di prima in modo che debbano risolvere www.gentoo.org

ma quando dal browser provo tale URL....dice "the server refused connection"
:evil:

da ke dipende ??
come posso fare ??

HELP ME

:twisted:
_________________
Io non sono nessuno...ma nessuno è come me!

"Open Source is a good idea..."
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Thu Oct 09, 2003 8:26 pm    Post subject: Reply with quote

Controlla i log!
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
hellraiser
Guru
Guru


Joined: 14 Jun 2003
Posts: 431
Location: Pescara [Italy]

PostPosted: Fri Oct 10, 2003 11:14 am    Post subject: Reply with quote

i log sono muti :evil:

non so da cosa dipende...

:evil: :evil: :evil: :evil:
_________________
Io non sono nessuno...ma nessuno è come me!

"Open Source is a good idea..."
Back to top
View user's profile Send private message
Ginko
Guru
Guru


Joined: 01 May 2002
Posts: 371
Location: nearby my linux laptop

PostPosted: Fri Oct 10, 2003 12:04 pm    Post subject: Reply with quote

Mi sembra che la soluzione piu' elegante ed efficiente sia utilizzare mod_rewrite di Apache. Lo trovi qui e e qualche esempio lo trovi qui.

In pratica ti basta la seguente configurazione di Apache mod_rewrite :

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST}   ^www.gentoo.org$
RewriteRule ^/(.*)         http://localhost/gentoo [L,R]
RewriteCond %{HTTP_HOST}   ^www.kernel.org$
RewriteRule ^/(.*)         http://localhost/kernel [L,R]


[EDIT] L'ho appena provato e funziona perfettamente, pero' hai anche bisogno di mettere www.gentoo.org e www.kernel.org nel file /etc/hosts assieme a localhost (127.0.0.1)

Saluti
--Gianluca
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Fri Oct 10, 2003 6:33 pm    Post subject: Reply with quote

I log sono quelli di apache, credo che siano in /var/log.
Forse si dovrebbe chiamare error.log.
Puoi trovare i tuoi logfiles nel file di configurazione.
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
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