apache authenticates on DB

This commit is contained in:
boyska 2018-09-30 00:40:06 +02:00
parent 5cab65d85f
commit b23df82c75
4 changed files with 19 additions and 11 deletions

View file

@ -56,11 +56,14 @@ services:
- APACHE_SERVER_NAME=rss-bridge - APACHE_SERVER_NAME=rss-bridge
feedati-fe: feedati-fe:
image: httpd:2.4-alpine image: feedati/frontend
build:
context: .
dockerfile: ./docker/Dockerfile-frontend
container_name: feedati_webserver container_name: feedati_webserver
volumes: volumes:
- ./docker/frontend-apache.conf:/usr/local/apache2/conf/httpd.conf:ro - ./docker/frontend-apache.conf:/usr/local/apache2/conf/httpd.conf:ro
- ./docker/frontend-apache/:/etc/apache2/:ro # - ./docker/frontend-apache/:/etc/apache2/:ro
- ./docker/frontend-login/:/var/www/login/:ro - ./docker/frontend-login/:/var/www/login/:ro
ports: ports:
- 80:80 - 80:80

View file

@ -0,0 +1,5 @@
FROM httpd:2.4-alpine
RUN apk --no-cache add apr-util-dbd_pgsql
# vim: set ft=dockerfile:

View file

@ -16,8 +16,8 @@ LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule unixd_module modules/mod_unixd.so LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so #LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so #LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so LoadModule alias_module modules/mod_alias.so
@ -27,8 +27,8 @@ LoadModule session_cookie_module modules/mod_session_cookie.so
LoadModule request_module modules/mod_request.so LoadModule request_module modules/mod_request.so
LoadModule authz_user_module modules/mod_authz_user.so LoadModule authz_user_module modules/mod_authz_user.so
LoadModule auth_form_module modules/mod_auth_form.so LoadModule auth_form_module modules/mod_auth_form.so
LoadModule authn_file_module modules/mod_authn_file.so LoadModule authn_dbd_module modules/mod_authn_dbd.so
# LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule dbd_module modules/mod_dbd.so
LoadModule macro_module modules/mod_macro.so LoadModule macro_module modules/mod_macro.so
LoadModule rewrite_module modules/mod_rewrite.so LoadModule rewrite_module modules/mod_rewrite.so
@ -50,13 +50,14 @@ ServerAdmin you@example.com
ServerName feedati-fe:80 ServerName feedati-fe:80
DBDriver pgsql
DBDParams "host=db dbname=feeds user=apache password=apachepass"
<Macro Auth> <Macro Auth>
AuthFormLoginRequiredLocation "/login/" AuthFormLoginRequiredLocation "/login/"
AuthFormLoginRequiredLocation "/login/"
AuthFormProvider file
# authn # authn
AuthFormProvider file AuthFormProvider dbd
AuthUserFile /etc/apache2/passwords.txt AuthDBDUserPWQuery "SELECT password FROM users.users WHERE username = %s"
# form # form
AuthType form AuthType form
AuthName "authenticationform" AuthName "authenticationform"

View file

@ -1 +0,0 @@
admin:$2y$05$tPaBuT/mWQCvfk1C12PmV.0Dz8kt0cY1jcD53OGCN26Y8dX2kRPs.