I am attempting to configure my amazon server with Apache Http to prompt the user for username/password upon hitting the domain via browser.
Here is a snippet from my app.conf file (included in the httpd.conf)
Alias / "/opt/bitnami/apache2/htdocs"
<Directory "/opt/bitnami/apache2/htdocs">
AuthType Basic
AuthName "No Trespassing"
AuthUserFile "/opt/bitnami/apache2/users"
Require valid-user
<IfVersion < 2.3 >
Order allow,deny
Allow from all
Satisfy all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
ErrorDocument 403 "Authentication error"
</Directory>
After logging in I am redirected to a 401 “Authorization error” page. Any reason here? I am thinking perhaps my other .conf file causes some conflict.
In httpd.conf I have the following:
WSGIScriptAlias / /opt/bitnami/apps/django/scripts/djangoApp.wsgi
<Directory '/opt/bitnami/apps/django/django_projects/djangoApp'>
Order allow,deny
Allow from all
Satisfy all
</Directory>
Could the first line of each of those snippets be causing a conflict here, preventing me from logging in? I am not sure, but they both look to be creating a similar alias.
If there are any more details I should provide, please let me know.
Here is the error in the logs:
[Wed Jan 09 03:49:49 2013] [error] [client X.X.X.X] client denied by server configuration: /opt/bitnami/apache2/htdocsindex.html
[Wed Jan 09 03:49:49 2013] [error] [client X.X.X.X] client denied by server configuration: /opt/bitnami/apache2/htdocsfavicon.ico
[Wed Jan 09 03:50:28 2013] [error] [client X.X.X.X] client denied by server configuration: /opt/bitnami/apache2/htdocsindex.html
[Wed Jan 09 03:50:28 2013] [error] [client X.X.X.X] client denied by server configuration: /opt/bitnami/apache2/htdocsfavicon.ico
[Wed Jan 09 03:50:28 2013] [error] [client X.X.X.X] client denied by server configuration: /opt/bitnami/apache2/htdocsfavicon.ico
I think your problem is one of 2 things:
potential solution #1
Simply that the user that Apache is running as doesn’t have access to the
/opt/bitnami/apache2/htdocsdirectory.See this page for more details on dealing with the “client denied by server configuration errors”: http://wiki.apache.org/httpd/ClientDeniedByServerConfiguration
Check to see what user/groups are set on the
/opt/bitnamidirectory tree. Make sure that they’re friendly to the Apache user.potential solution #2
Also if you look at your error messages the path is missing a ‘/’ after htdocs. See the paths:
I think you need to add a trailing slash, ‘/’, to your
Aliasline like so: