I would like to setup a Joomla website that requires visitors to login, unless they are visiting from a specific IP address or subnet.
Crie um host virtual para o Joomla como abaixo:
<VirtualHost *:80>
ServerName joomla.yourdomain.com
ServerAdmin ...
DocumentRoot /var/www/html/joomla
ErrorLog logs/joomla.error_log
<Directory "/var/www/html/joomla">
Options ...
Order allow,deny
Allow from 192.168.1.0/24
Satisfy Any
</Directory>
</VirtualHost>
Also, I would like the login to be LDAP based.
Você pode fazer isso usando mod_authz_ldap , algo assim:
LoadModule authz_ldap_module modules/mod_authz_ldap.so
<IfModule mod_authz_ldap.c>
<Location /var/www/html/joomla>
AuthBasicProvider ldap
AuthzLDAPAuthoritative Off
AuthLDAPURL ldap://IP:3268/dc=domain,dc=com?sAMAccountName
AuthLDAPBindDN cn=binduser,dc=domain,dc=com
AuthLDAPBindPassword secret
AuthType Basic
AuthName "Authorization required"
require valid-user
AuthzLDAPLogLevel debug
</Location>
</IfModule>
Is HTTPS auth using LDAP (MS-AD) an option?
Sim.