Il tuo IP:

38.107.191.81
htaccess e Autenticazione MySQL
Valutazione attuale: / 1
ScarsoOttimo 
Scritto da Federica   
Venerdì 20 Luglio 2007 14:53

Per Debian/ubuntu installare il pacchetto libapache2-mod-auth-mysql

Nella configurazione globale di Apache inserire:
#--------------------------------------------------------------------------
# MySQL authentication: default access to the database.
#--------------------------------------------------------------------------
AuthMySQL_DefaultHost localhost
AuthMySQL_DefaultUser guest
AuthMySQL_DefaultPassword guest
AuthMySQL_AllowOverride On

Poi nella directory da proteggere creare il file .htaccess con:
AuthName "Accesso riservato"
AuthType Basic
AuthBasicAuthoritative Off
Auth_MYSQL on

AuthMySQL_Host localhost
AuthMySQL_User pluto
AuthMySQL_Password paperino

Auth_MySQL_DB studiofelli
Auth_MySQL_Password_Table user_auth
Auth_MySQL_Username_Field user_name
Auth_MySQL_Password_Field user_passwd

Auth_MySQL_Encrypted_Passwords Off
Auth_MySQL_Scrambled_Passwords Off
Auth_MySQL_Empty_Passwords Off

Auth_MySQL_Group_Table user_group
Auth_MySQL_Group_Field user_group

require valid-user
IMPORTANTE: la direttiva AuthBasicAuthoritative Off. Senza questa direttiva viene comunque tentata l’autenticazione su file che fallisce e quindi quella su MySQL non viene neanche provata.
Argomenti correlati: Linux database

+/-
Commenta
Nome:
Email:
 
Titolo:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.
+/- Commenti
Nuovo

our Copyright

 
Dario&Federica
Hosting neomediatech