The output from sudo apachectl -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
headers_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
ssl_module (shared)
status_module (shared)
Syntax OK
Seems to indicate that the digest auth module is working on my server, but when I try to access $_SERVER['PHP_AUTH_DIGEST'], the variable doesn't exist.
My virtualhost setup is:
<VirtualHost *:80>
ServerName sam
DocumentRoot /var/www/sam/public/
ErrorLog /var/log/apache2/sam-error.log
SetEnv APPLICATION_ENV "development"
<Directory /var/www/sam/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
#AuthType Digest
#AuthName "api"
</Directory>
</VirtualHost>
In your Apache configuration, you've not enabled Digest authentication. Try uncommenting the relevant lines and restart Apache through
sudo /etc/init.d/apache2 restart
:If this did not work or gives a server error, check the error log in
/var/log/apache2/access.log
.If you implement Digest authentication, you may want to check the digest authentication example on php.net. A description of all
$_SERVER
variables can be found here.