Basic Auth + PAM2014/12/30 |
Limit accesses on specific web pages and use OS users for authentication with SSL connection.
|
|
[1] | Configure httpd. |
[root@www ~]#
yum -y install mod_authnz_external pwauth
[root@www ~]#
vi /etc/httpd/conf.d/authnz_external.conf # add to the end : require pam-auth under the /var/www/html/auth-pam <Directory /var/www/html/auth-pam> SSLRequireSSL AuthType Basic AuthName "PAM Authentication" AuthBasicProvider external AuthExternal pwauth require valid-user </Directory>
[root@www ~]#
[root@www ~]# systemctl restart httpd
mkdir /var/www/html/auth-pam
[root@www ~]#
vi /var/www/html/auth-pam/index.html # create a test page <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 a Web browser on Client and authenticate with a user which is on OS. |
Just accessed. |
Sponsored Link |