I have a Django site with mod_wsgi
configured, using Apache 2.4 as web server.
Virtual Host:
<VirtualHost *:80>
ServerName site.com
ServerAlias site.com
ServerAdmin example@example.com
DocumentRoot /var/www/site
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Alias /media/ /var/www/site/media
Alias /static/ /var/www/site/static
<Directory /var/www/site>
Require all granted
AllowOverride All
</Directory>
WSGIScriptAlias / /var/www/site/nep/wsgi.py
ErrorLog /var/log/apache2/site/error.log
CustomLog /var/log/apache2/site/access.log combined
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
</VirtualHost>
I have the files .htaccess
and .htpasswd
in /var/www/site
.
.htaccess content:
AuthType Basic
AuthName "Portal Dev Environment, restricted content"
AuthUserFile /var/www/site/.htpasswd
Require valid-user
I have searched all possible solutions for the problem, but can't find one.
Is there a misconfiguration in Virtual Host that is preventing .htaccess
/.htpasswd
to work?