Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Configurare bene Apache
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
leonida
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2004
Posts: 103
Location: Milano-Italia

PostPosted: Mon Sep 27, 2004 8:00 pm    Post subject: Configurare bene Apache Reply with quote

Quoto FD da questo thread:
FonderiaDigitale wrote:
e' semplicemente apache configurato male. aggiungi un / in fondo alla url se non contiene un file finale.

Ho appena visto che sulla GWN di oggi c'è il link al Gechi LWE Movie senza lo slash finale per cui il link va a vuoto :(.
O si corregge il link sulla GWN o mi dite come si fa a configurare bene Apache :)
Grazie .L.
_________________
FreeSMUG - carracho://freesmug.org
copyleft radio (MP3 player): http://radioleonida.dyndns.org:8010
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30996
Location: here

PostPosted: Mon Sep 27, 2004 8:13 pm    Post subject: Reply with quote

mmm. Allora se si mette cosi'
http://www.freesmug.org/video/gechi
non punta a nulla ma se mettiamo lo slash finale funziona
http://www.freesmug.org/video/gechi/

Non capisco cosa possa essere
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30996
Location: here

PostPosted: Mon Sep 27, 2004 8:15 pm    Post subject: Reply with quote

Nel file /etc/apache2/conf/apache2.conf come hai messo la DocumentRoot?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
leonida
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2004
Posts: 103
Location: Milano-Italia

PostPosted: Mon Sep 27, 2004 8:17 pm    Post subject: Reply with quote

fedeliallalinea wrote:
mmm. Allora se si mette cosi'
http://www.freesmug.org/video/gechi
non punta a nulla ma se mettiamo lo slash finale funziona
http://www.freesmug.org/video/gechi/
Non capisco cosa possa essere


Esatto, lo stesso problema del thread precedente con il link alle foto dell'ultimo GentooPub.
FD dice che è un problema di configurazione di Apache; forse si fa anche prima a correggere il link alla pagina della GWN.
_________________
FreeSMUG - carracho://freesmug.org
copyleft radio (MP3 player): http://radioleonida.dyndns.org:8010
Back to top
View user's profile Send private message
leonida
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2004
Posts: 103
Location: Milano-Italia

PostPosted: Mon Sep 27, 2004 8:43 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Nel file /etc/apache2/conf/apache2.conf come hai messo la DocumentRoot?


Premesso che ho Apache 1.? di MacOSX e ho guardato il file /private/etc/httpd/httpd.conf, riporto quello che c'è scritto:

Code:

....
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Library/WebServer/Documents"

#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
 
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
 
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/Library/WebServer/Documents">

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
...

E' stata fatta anche una configurazione di VirtualHost per andare direttamente alla porta 8200 di Zope tranne che per queste directory:
Code:
RewriteEngine On
  RewriteRule ^/mirrors/(.*) - [L]
  RewriteRule ^/video/(.*) - [L]
  RewriteRule /(.*) http://localhost:8200/VirtualHostBase/http/www.freesmug.org:80/VirtualHostRoot/$1 [P,L]

_________________
FreeSMUG - carracho://freesmug.org
copyleft radio (MP3 player): http://radioleonida.dyndns.org:8010
Back to top
View user's profile Send private message
MyZelF
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 2010
Location: Venice, Italy

PostPosted: Tue Sep 28, 2004 7:56 am    Post subject: Reply with quote

fedeliallalinea wrote:
mmm. Allora se si mette cosi'
http://www.freesmug.org/video/gechi
non punta a nulla ma se mettiamo lo slash finale funziona
http://www.freesmug.org/video/gechi/


Non mi sembra funzioni in nessuno dei due modi... Comunque se non ricordo male apache fa questo scherzetto quanto la direttiva ServerName non è settata correttamente.
_________________
"Larry the Cow was a bit frustrated at the current state of Linux Distributions..."
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


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

PostPosted: Tue Sep 28, 2004 8:05 am    Post subject: Reply with quote

MyZelF wrote:
fedeliallalinea wrote:
mmm. Allora se si mette cosi'
http://www.freesmug.org/video/gechi
non punta a nulla ma se mettiamo lo slash finale funziona
http://www.freesmug.org/video/gechi/


Non mi sembra funzioni in nessuno dei due modi... Comunque se non ricordo male apache fa questo scherzetto quanto la direttiva ServerName non è settata correttamente.


Il secondo link funziona perfettamente :wink:
_________________
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: Tue Sep 28, 2004 8:07 am    Post subject: Reply with quote

gutter wrote:
Il secondo link funziona perfettamente :wink:


Idem.

leonida, hai il problema anche se cerchi di bypassare il rewrite?
_________________
Ciao da me!
Back to top
View user's profile Send private message
MyZelF
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 2010
Location: Venice, Italy

PostPosted: Tue Sep 28, 2004 8:11 am    Post subject: Reply with quote

gutter wrote:
Il secondo link funziona perfettamente :wink:


ok, ora va anche a me il secondo... :roll:
_________________
"Larry the Cow was a bit frustrated at the current state of Linux Distributions..."
Back to top
View user's profile Send private message
leonida
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2004
Posts: 103
Location: Milano-Italia

PostPosted: Tue Sep 28, 2004 8:03 pm    Post subject: Reply with quote

Forse non mi sono spiegato bene, se andate a leggere la GWN del 27 Settembre nella sezione "4. Gentoo international" hanno inserito il link alla pagina con i filmati della presentazione di .:DeadHead: al LWE.
Il problema è che questo link non ha lo slash finale e quindi da errore.
Le soluzioni sono 2:

1. Si segnala ai redattori della GWN che il link è sbagliato.

2. Mi dite come si fa a configurare bene Apache affinchè il link si apra anche senza lo slah finale.

Thank .L.
_________________
FreeSMUG - carracho://freesmug.org
copyleft radio (MP3 player): http://radioleonida.dyndns.org:8010
Back to top
View user's profile Send private message
MyZelF
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 2010
Location: Venice, Italy

PostPosted: Wed Sep 29, 2004 6:27 am    Post subject: Reply with quote

MyZelF wrote:
Comunque se non ricordo male apache fa questo scherzetto quando la direttiva ServerName non è settata correttamente.


Hai controllato questo?
_________________
"Larry the Cow was a bit frustrated at the current state of Linux Distributions..."
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Wed Sep 29, 2004 9:48 am    Post subject: Reply with quote

E questo?

randomaze wrote:
hai il problema anche se cerchi di bypassare il rewrite?


lo dico perché mi sembra di ricordare che un problema simile lo avevamo risolto lavorando sul rewrite.
Purtroppo questo é successo un tot. di tempo fa.
_________________
Ciao da me!
Back to top
View user's profile Send private message
leonida
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2004
Posts: 103
Location: Milano-Italia

PostPosted: Wed Sep 29, 2004 7:21 pm    Post subject: Reply with quote

MyZelF wrote:
MyZelF wrote:
Comunque se non ricordo male apache fa questo scherzetto quando la direttiva ServerName non è settata correttamente.


Hai controllato questo?


Credo che non sia configurato:
Code:
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
#ServerName blaze

@randomaze, non saprei come bypassare il rewrite, sorry, nel senso non vorrei toccare troppo il file httpd.conf.

Ho scritto due righe a gwn-feedback@gentoo.org per segnalare il broken link.
_________________
FreeSMUG - carracho://freesmug.org
copyleft radio (MP3 player): http://radioleonida.dyndns.org:8010
Back to top
View user's profile Send private message
MyZelF
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 2010
Location: Venice, Italy

PostPosted: Wed Sep 29, 2004 8:25 pm    Post subject: Reply with quote

leonida wrote:
Credo che non sia configurato:


Appunto... :roll:

prova a settarlo a "www.freesmug.org", fai rileggere il file di configurazione ad apache e riprova.
_________________
"Larry the Cow was a bit frustrated at the current state of Linux Distributions..."
Back to top
View user's profile Send private message
AndreaR
n00b
n00b


Joined: 18 Feb 2004
Posts: 44

PostPosted: Wed Sep 29, 2004 10:07 pm    Post subject: Reply with quote

fedeliallalinea wrote:
mmm. Allora se si mette cosi'
http://www.freesmug.org/video/gechi
non punta a nulla ma se mettiamo lo slash finale funziona
http://www.freesmug.org/video/gechi/

Non capisco cosa possa essere


è semplicemente il fatto che la direttiva UseCanonicalName è settata ad on basta settarla ad off oppure lasciandola ad off bisogna giocare con il modulo rewrite e le espressioni regolari vedi guida http://www.engelschall.com/pw/apache/rewriteguide/ se si cerca su google "Trailing Slash Problem" c'è un sacco di esempi e al riguardo :)
Back to top
View user's profile Send private message
leonida
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2004
Posts: 103
Location: Milano-Italia

PostPosted: Thu Sep 30, 2004 9:51 am    Post subject: Reply with quote

Ok grazie mille per le info e i link, farò qualche prova.
Devo stare attento alle regole di rewrite perchè con www.freesmug.org si accede direttamente alla porta 8200 di Zope e non a quella 80 di apache... e come avete capito non sono tanto esperto, sorry :?
_________________
FreeSMUG - carracho://freesmug.org
copyleft radio (MP3 player): http://radioleonida.dyndns.org:8010
Back to top
View user's profile Send private message
!equilibrium
Bodhisattva
Bodhisattva


Joined: 06 Jun 2004
Posts: 2109
Location: MI/BG/LC

PostPosted: Thu Sep 30, 2004 10:16 pm    Post subject: Reply with quote

dunque da quello che ne so io:

Quote:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^81.208.84.205(:80)?$
RewriteCond %{HTTP_HOST} !^www.freesmug.org(:80)?$
RewriteRule ^/gechi(.*) http://www.freesmug.org/video/gechi/$1 [L,R]


EDIT:
questo redirige tutti i file chiamati "gechi" con qualunque estensione verso www.freesmug.org/video/gechi/ lasciando inalterate le eventuali variabili passate via url (non ho idea se ce ne siano o meno... in caso non ce ne fossero affatto potete semplificare di + la regola)

EDIT2:
causa ora tarda e troppa birra mi sono dimentico di specificare che il file www.freesmug.org/video/gechi non è neccessario che venga creato fisicamente nella root del virtualhost perchè le rewrite condition lavorano sulle url e non sui file... per cui basta digitare nel browser www.freesmug.org/gechi (si, non manca una parte, l'ho scritto apposta senza /video/, anche cosi funzionerà) e parte il rewrite engine che ridirige verso www.freesmug.org/video/gechi/... ovviamente tutto il percorso prima di ^/gechi(.*) deve esistere, quindi le cartelle ci devono essere (ma non credo che questo sia un problema)
---

ovviamente va messa come direttiva solo per il virtual host di freesmug.org altrimenti viene applicata a tutti i virtualhost presenti sotto apache...

non ne sono sicuro al 100%, ma credo vada messa dopo l'altra direttiva di rewrite che usate per il redirect di zope...
_________________
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
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