Basic Auth + PAM2013/07/15 |
Configure httpd and set a page that people must authenticate and the authentication is from PAM.
|
|
[1] | Install mod-auth-external and pwauth. |
[root@www ~]#
yum -y install mod_authnz_external pwauth
[root@www ~]#
vi /etc/httpd/conf.d/authnz_external.conf # add at the last: for example, users must authenticate under /var/www/html/test <Directory /var/www/html/test> SSLRequireSSL AuthType Basic AuthName "PAM Authentication" AuthBasicProvider external AuthExternal pwauth require valid-user </Directory>
[root@www ~]#
systemctl restart httpd.service # create a test page
[root@www ~]#
vi /var/www/html/test/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Test Page for PAM Auth </div> </body> </html> |
Access to the test page with web browser, then authentication is required as a config. Input a user in local /etc/passwd and authenticate here. |
Just accessed. |
Sponsored Link |
|