I successfully setup an Apache that acts as reverse proxy (with basic auth and https) for a service running on a machine in my local network.

Connecting from the internet works fine but if i want to connect from lan some clients (e.g. java based) have problems with to connect (certificate problem).

Because of that and for convenience i want allow local machines to connect via http and without basic auth. How to achieve this?

This are my current virtual hosts:

<VirtualHost _default_:80>
    DocumentRoot "${SRVROOT}/htdocs"
    #ServerName www.example.com:80

<VirtualHost *:443>
    ServerAdmin gmail.com
    ServerName <some domain>

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyVia Off
    ProxyPass /
    ProxyPassReverse /
    <Location />    
        AuthUserFile "...passwd.txt"
        AuthName "secured"
        AuthType Basic
        Require valid-user

        Alias /.well-known C:/xampp/htdocs/.well-known

    SSLEngine on
    SSLCertificateFile "...chain.pem"
    SSLCertificateKeyFile "...key.pem"
    SSLCertificateChainFile "...-crt.pem"

The first one is needed to renew the letsencrypt certificate. the second one is the one i want to open for local machines (http without basic auth)


You can use the same proxy directives but with a block restricting by IP address or network. Add something similar, plus any other directives that are required, to the following to your port 80 vhost:

ProxyPass /
ProxyPassReverse /
<Location />
require ip <local network in CIDR notation>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.