Apache access control

I am trying to configure Apache to allow read-only access and ask the user to write to the SVN repository when coming from local network (10. *), but do not allow access if not logged in when logging out from external network.

I understand how Order, Deny, Allow and Limit directives work, but I don't know if it's possible / how to combine them to achieve the desired result.

<Location /svn>
  # Set mod_dav_svn settings
  DAV svn
  SVNListParentPath on
  SVNParentPath /mnt/svn
  AuthzSVNAccessFile /mnt/svn/.authz

  # Set Authentication
  AuthType Basic
  AuthName "Auth Realm"
  AuthUserFile /mnt/svn/.htpasswd

  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1 10.0.0.0/8

  <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
  </LimitExcept>
  Satisfy Any
</Location>

      

I know this will allow access to any local traffic, but ask to login when trying to record from external traffic. This is close to what I want. Any help or suggestions on what to read is greatly appreciated.

0


source to share


2 answers


I don't think there is a solution.



0


source


This may be a late answer, but you can add two



The VirtualHost directive requires an ip or * and a listening port. Assuming your hosting is on a machine with two NICs, as long as each is only listening on the correct card, it should do what you wanted ....

0


source







All Articles