I set following vhost which I want to be accessible without login when called from within the network, but with login when called from outside. However, no matter how I change the Require IP, RequireAny, ... I can't bring it to work. What am I missing here?
<IfModule mod_proxy.c>
<VirtualHost *:80>
ServerName sub.domain.com
ServerAdmin mail@domain.com
ProxyPass / http://192.168.1.20/
ProxyPassReverse / http://192.168.1.20/
<Proxy *>
AuthType Basic
AuthName "Only for administrators"
AuthBasicProvider file
AuthUserFile /etc/apache2/passwords/mypasswordfile.pwd
AuthGroupFile /dev/null
<RequireAny>
Require local
Require ip 192.168.1.0/24
Require host domain.com
Require valid-user
</RequireAny>
</Proxy>
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
</IfModule>
Looking for advice...