In apache mi sono appena creato un virtual hosts e volevo fare qualche
test di entrata impostando utenti e password. Ecco cosa ho fatto: Semplicemente ho definito questo virtual host in httpd.conf ### Section 3: Virtual Hosts #NameVirtualHost 12.34.56.78:80 #NameVirtualHost 192.168.0.2 Listen 8081 # #<VirtualHost _default_:*> #</VirtualHost> <VirtualHost 192.168.0.2:8081> DocumentRoot /var/www1 </VirtualHost> <Directory /var/www1> Options Indexes </Directory> # Automatically added by the post-installation script # as part of the transition to a config directory layout # similar to apache2, and that will help users to migrate # from apache to apache2 or revert back easily Include /etc/apache/conf.d In /var/www1 ho i seguenti file: -rw-r--r-- 1 root root 133 2006-08-08 21:02 .htaccess -rw-r--r-- 1 root root 21 2006-08-08 21:04 .htpasswd -rw-r--r-- 1 root root 5266 2006-08-08 15:24 index.html debian:/var/www1# Ecco il file .htaccess AuthUserFile /var/www1/.htpasswd AuthGroupFile /dev/null AuthName "DIreccccc" AuthType Basic <Limit GET> require valid-user </limit> Ed il file .htpasswd prova:DK6TAXz0ekWLQ Se mi collego alla pagina però riesco a vedere il file index.html presente in /var/www1 ma non mi chiede l'utente e la pwd per entrare. Che sbaglio? ciao |