Problem with configuring apache for authentication...
Posted: 13 Jan 2007, 22:55
Hi,
I have managed to get SPGM photo gallery up and running just fine now (referring to post http://excito.org/forum/viewtopic.php?t=10), but now I have another problem
First of all, I don't have a lot of experience in this area, so I might have overlooked something elementary here, but:
I want to be able to restrict access to my photo galleries on my bubba, so that only authenticated users are able to access these files.
According to
http://httpd.apache.org/docs/2.0/howto/auth.html
this should be easily accomplished by first creating a password file and then by either adding a .htaccess file to the directory in question or modifying httpd.conf.
My .htaccess file looks like this:
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwd/passwords
Require user galleryguest
where the file /etc/apache2/passwd/passwords was created using htpasswd.
I have tried both methods (and also tried adding a <Directory /home/web/photogallery/>-directive to apache2.conf at the bottom) but without luck. Inspecting the /var/log/apache/error.log after restarting the webserver reveals no errors. This is what my error.log looks like after a restart:
[Sun Jan 14 03:09:34 2007] [notice] caught SIGTERM, shutting down
[Sun Jan 14 03:09:53 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Sun Jan 14 03:10:07 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Sun Jan 14 03:10:07 2007] [notice] Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.0.54 OpenSSL/0.9.7e configured -- resuming normal operations
And I guess the 2 warnings don't have anything to do with this. Are there some important modules (mod_auth or something?) that aren't loaded, so that the directives that I specified just "fail silently"?
Hoping some of you guys can shed some light on this.
Note: what actually happens now, when I try to access my gallery, is just that I am able to access the files without being asked for any user credentials...
/dengamle.
I have managed to get SPGM photo gallery up and running just fine now (referring to post http://excito.org/forum/viewtopic.php?t=10), but now I have another problem

First of all, I don't have a lot of experience in this area, so I might have overlooked something elementary here, but:
I want to be able to restrict access to my photo galleries on my bubba, so that only authenticated users are able to access these files.
According to
http://httpd.apache.org/docs/2.0/howto/auth.html
this should be easily accomplished by first creating a password file and then by either adding a .htaccess file to the directory in question or modifying httpd.conf.
My .htaccess file looks like this:
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwd/passwords
Require user galleryguest
where the file /etc/apache2/passwd/passwords was created using htpasswd.
I have tried both methods (and also tried adding a <Directory /home/web/photogallery/>-directive to apache2.conf at the bottom) but without luck. Inspecting the /var/log/apache/error.log after restarting the webserver reveals no errors. This is what my error.log looks like after a restart:
[Sun Jan 14 03:09:34 2007] [notice] caught SIGTERM, shutting down
[Sun Jan 14 03:09:53 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Sun Jan 14 03:10:07 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Sun Jan 14 03:10:07 2007] [notice] Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.0.54 OpenSSL/0.9.7e configured -- resuming normal operations
And I guess the 2 warnings don't have anything to do with this. Are there some important modules (mod_auth or something?) that aren't loaded, so that the directives that I specified just "fail silently"?
Hoping some of you guys can shed some light on this.
Note: what actually happens now, when I try to access my gallery, is just that I am able to access the files without being asked for any user credentials...
/dengamle.