Score:0

Apache2 on Centos 7 will not let me restrict access to IPs other than my own

uz flag
Edm

I am trying to restrict access to any IP but my own, and I've searched up how to do it but it doesn't work. I've searched up how to do it on CentOS, but nobody cares about CentOS so there's no help there. This is what I've done in httpd.conf:

<Directory "/var/www/html">
    Options Indexes FollowSymLinks

    AllowOverride AuthConfig

    <IfModule mod_authz_core.c>
        <RequireAny>
           Require ip *.**.*x.*x
        </RequireAny>
    </IfModule>
</Directory>

I've tried this without "IfModule," without "RequireAny," just with "IfModule" or "RequireAny" and just "Require ip" by itself. None of it works, I am absolutely frustrated. I checked my Apache version and it's 2.4.6. Is there anything I'm missing here?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.