Bug 843286 - mod_authn_file.so is not enabled on the cartridge's apache conf. That causes: "Invalid command AuthUserFile; perhaps it is misspelled"
Summary: mod_authn_file.so is not enabled on the cartridge's apache conf. That causes...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-25 23:25 UTC by Nam Duong
Modified: 2015-05-14 22:57 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 18:48:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nam Duong 2012-07-25 23:25:25 UTC
Description of problem:
As per forum post: 
https://openshift.redhat.com/community/forums/openshift/how-to-password-protect-my-app

user is trying to password-protect the working dir via .htaccess and .htpasswd, but is getting an error:  
"Invalid command AuthUserFile; perhaps it is misspelled"

Is this use case supported?

Comment 1 Christian Jann 2012-08-28 09:57:55 UTC
Same here:

-----.htaccess-------
AuthUserFile /var/lib/stickshift/12345678901234567890/app-root/runtime/repo/php/internal-project-docu/.htpasswd
AuthType Basic
AuthName "Project"
Require valid-user
-----.htaccess-------

-----.htpasswd-------
user:hash
-----.htpasswd-------

firefox http://projects.domain.tld/internal-project-docu

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.15 (Red Hat) Server at projects.domain.tld Port 80

[www-userxy.rhcloud.com ~]\> cat php-5.3/logs/error_log-20120828-000000-EST 
...
[Tue Aug 28 05:28:15 2012] [notice] Apache/2.2.15 (Unix) configured -- resuming normal operations
[Tue Aug 28 05:28:39 2012] [alert] [client 127.4.123.321] /var/lib/stickshift/12345678901234567890/app-root/runtime/repo/php/internal-project-docu/.htaccess: Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration

I really need this feature.

Comment 2 Lee Graham 2012-10-12 12:24:02 UTC
+1 - Same issue as Christian.




HTACCESS FILE
AuthUserFile /var/lib/stickshift/*************************************************/app-root/runtime/repo/php/.htpasswd AuthType Basic AuthName "Admin" Require valid-user

HTPASSWD FILE (username:password) 
username:$apr1$vl0h5yU7$Ea0j8gD6QoDSWcXzxW1LC.





Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.





ERROR LOG
[Thu Oct 11 15:32:54 2012] [alert] [client 127.2.94.129] /var/lib/stickshift/*************************************************/app-root/runtime/repo/php/.htaccess: Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration, referer: http://******-***.rhcloud.com/

Comment 4 Rob Millner 2012-10-18 19:31:04 UTC
Pull requests merged.

Comment 5 Jianwei Hou 2012-10-19 02:11:45 UTC
Verified on devenv_2348

Steps:
1. Create an app
2. SSH into app, use htpasswd to create password
[php1-2348t.dev.rhcloud.com php]\> pwd
/var/lib/openshift/194a5f87ea724988ba352377f0975e81/app-root/runtime/repo/php
[php1-2348t.dev.rhcloud.com php]\> htpasswd -c .htpasswd jhou
New password: 
Re-type new password: 
Adding password for user jhou
[php1-2348t.dev.rhcloud.com php]\> cat .htpasswd 
jhou:FZK7j.E0AR2Rs

password created successfully.

Comment 6 edd 2012-10-25 04:48:09 UTC
Creating a password using htpasswd works, but the server still throws a 500 error. The logs say:

[Thu Oct 25 00:39:46 2012] [alert] [client 127.2.105.129] /var/lib/stickshift/---/app-root/runtime/repo/php/.htaccess: Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration

Comment 7 Rob Millner 2012-10-25 18:05:29 UTC
This is fixed in our development environment but hasn't moved into production yet (hence the bug state in verified rather than closed).

It should go to production in a few weeks.


Note You need to log in before you can comment on or make changes to this bug.