Pagina 1 di 1
[Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 9:35
da Gono
Ho istallato apache da tempo sul mio computer e funziona benissimo (good).
Però adesso che mi serve lavorare con i file .htaccess non mi funzionano !!
Se non sbaglio dovrei modificare un file di configurazione.
Però non ne ho la minima idea di come si modifica e sopratutto non sò qual'è >:(
Qualcuno mi può dare una mano ???
Re: Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 15:19
da apisty1
Re: Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 15:51
da Gono
Ecco l'output:
Codice: Seleziona tutto
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Re: Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 15:56
da apisty1
Ciao, cambia la riga
AllowOverride None sostituendo
None con
All, in questa maniera:
Codice: Seleziona tutto
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Edit: Dimenticavo, successivamente riavvia il server.
Re: Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 18:56
da Gono
Funziona !!!
Grazie mille (b2b)
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 18:58
da apisty1
Perfetto, aggiungi [Risolto] al titolo del primo post. (b2b)
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 19:14
da Gono
C'è un ultimo problemino, dopo aver fatto l'autenticazione (nel file .htaccess ) il server restituisce l'errore 500.
Come posso risolvere ??
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 19:36
da apisty1
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 19:45
da Gono
Non sò se ho capito bene ::)
Dovrei modificare con questo :
Codice: Seleziona tutto
<Directory "C:/apache/httpd/htdocs/manual">
Options Includes Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
Ovviamente mettendo l'indirizzo giusto !!
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 20:11
da apisty1
No, scusami lascia perdere quella guida. Aspettami un secondo ceno e sono da te.
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 20:39
da apisty1
Eccomi, postami il tuo ErrorLog:
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 20:42
da Gono
Eccolo :
Codice: Seleziona tutto
[Sun May 31 10:43:36 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
[Sun May 31 11:07:03 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 11:07:06 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 11:09:13 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 11:09:16 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 11:09:16 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 11:09:16 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 11:21:08 2009] [error] [client 79.51.57.180] File does not exist: /var/www/favicon.ico
[Sun May 31 11:21:11 2009] [error] [client 79.51.57.180] File does not exist: /var/www/favicon.ico
[Sun May 31 11:25:24 2009] [error] [client 79.51.57.180] File does not exist: /var/www/favicon.ico
[Sun May 31 15:43:04 2009] [notice] caught SIGTERM, shutting down
[Sun May 31 15:45:02 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
[Sun May 31 15:58:00 2009] [notice] caught SIGTERM, shutting down
[Sun May 31 16:00:01 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
[Sun May 31 20:51:14 2009] [notice] caught SIGTERM, shutting down
[Sun May 31 20:52:56 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
[Sun May 31 20:54:47 2009] [error] [client 127.0.0.1] File does not exist: /var/www/htacces
[Sun May 31 20:54:47 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 20:54:50 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Sun May 31 21:03:12 2009] [error] [client 79.40.44.64] (2)No such file or directory: Could not open password file: /etc/apache2/.htpasswd
[Sun May 31 21:03:12 2009] [error] [client 79.40.44.64] File does not exist: /var/www/favicon.ico
[Sun May 31 21:03:15 2009] [error] [client 79.40.44.64] File does not exist: /var/www/favicon.ico
[Sun May 31 21:03:50 2009] [error] [client 79.40.44.64] (2)No such file or directory: Could not open password file: /etc/apache2/.htpasswd
[Sun May 31 21:04:54 2009] [error] [client 79.40.44.64] (2)No such file or directory: Could not open password file: /etc/apache2/.htpasswd
[Sun May 31 21:05:20 2009] [error] [client 79.40.44.64] (2)No such file or directory: Could not open password file: /etc/apache2/.htpasswd
[Sun May 31 21:05:21 2009] [error] [client 79.40.44.64] (2)No such file or directory: Could not open password file: /etc/apache2/.htpasswd
[Sun May 31 21:11:22 2009] [error] [client 79.40.44.64] (2)No such file or directory: Could not open password file: /etc/apache2/.htpasswd
[Sun May 31 21:14:36 2009] [error] [client 79.40.44.64] (2)No such file or directory: Could not open password file: /etc/apache2/.htpasswd
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 21:07
da apisty1
Dal log viene fuori che manca il file /etc/apache2/.htpasswd. L'hai creato? (manca anche una favicon, se vuoi puoi crearla e metterla in /var/www/).
Puoi postarmi anche l' .htaccess file?
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 21:27
da Gono
eccolo
si capisce poco, è tutto criptato !!
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 21:34
da apisty1
Quello che hai postato è l' .htpasswd, il che mi fa capire che lo hai creato (spero si trovi in /var/www), io però ti avevo chiesto l'.htaccess non l' .htpasswd.
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 21:38
da Gono
scusa, troppo frettolone, posto prima di leggere
Codice: Seleziona tutto
AuthName "Titolo della finestra del login"
AuthUserFile .htpasswd
AuthType Basic
Require valid-user
<Files ~ ".*\.jpg$">
Require user pipp
</Files>
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 21:46
da apisty1
Se il file .htpasswd si trova in /var/www nel file che hai postato, alla voce AuthUserFile devi mettere tutto il path cioè:
Codice: Seleziona tutto
AuthName "Titolo della finestra del login"
AuthUserFile /var/www/.htpasswd
AuthType Basic
Require valid-user
<Files ~ ".*\.jpg$">
Require user pipp
</Files>
Salva e riavvia il server. Se torna l'errore riposta il log!
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 21:52
da Gono
funziona (good)
Grazie di tutto (b2b)
Re: [Risolto] Far funzionare un file .htaccess su apache
Inviato: domenica 31 maggio 2009, 21:54
da apisty1
Congratulazioni.
