Skip to content

Instantly share code, notes, and snippets.

@ozuma
Created September 19, 2014 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozuma/994a463bd58a515a069a to your computer and use it in GitHub Desktop.
Save ozuma/994a463bd58a515a069a to your computer and use it in GitHub Desktop.
Apacheで直接DBに接続してBASIC認証するサンプル
DBDriver mysql
DBDParams host=dbserver,user=dbuser,pass=dbpass,dbname=dbname
DBDPersist Off
<Location /hoge/fuga.cgi>
SSLRequrireSSL
AuthBasicProvider dbd
AuthDBDUserPWQuery "SELECT ENCRYPT('...') ... FROM tablename WHERE id = %s"
AuthName "Basic Auth"
require valid-user
ProxyPass ajp://localhost:8009/webapl/config
</Location>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment