Раздел 10. Apache modules Пункты: 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 163 164 165 166 167 168 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 203 204 205 206 207 208 209 210 211 212 213 RU EN Пункт 115. Apache Module mod_authz_host
SummaryThe authorization providers implemented by In general, access restriction directives apply to all
access methods ( The Require DirectivesApache's These authorization providers affect which hosts can access an area of the server. Access can be controlled by hostname, IP Address, or IP Address range. Since v2.4.8, expressions are supported within the host require directives. Require ipThe A full IP address: Require ip 10.1.2.3 Require ip 192.168.1.104 192.168.1.205 An IP address of a host allowed access A partial IP address: Require ip 10.1 Require ip 10 172.20 192.168.2 The first 1 to 3 bytes of an IP address, for subnet restriction. A network/netmask pair: Require ip 10.1.0.0/255.255.0.0 A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet restriction. A network/nnn CIDR specification: Require ip 10.1.0.0/16 Similar to the previous case, except the netmask consists of nnn high-order 1 bits. Note that the last three examples above match exactly the same set of hosts. IPv6 addresses and IPv6 subnets can be specified as shown below: Require ip 2001:db8::a00:20ff:fea7:ccea Require ip 2001:db8:1:1::a Require ip 2001:db8:2:1::/64 Require ip 2001:db8:3::/48 Note: As the IP addresses are parsed on startup, expressions are not evaluated at request time. Require hostThe A (partial) domain-name Require host example.org Require host .net example.edu Hosts whose names match, or end in, this string are allowed
access. Only complete components are matched, so the above
example will match Require forward-dnsThe In contrast to the Require forward-dns bla.example.org A client the IP of which is resolved from the name
The Require localThe
This allows a convenient way to match connections that originate from the local host: Require local Security NoteIf you are proxying content to your server, you need to be aware
that the client address will be the address of your proxy server,
not the address of the client, and so using the Пункты: 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 163 164 165 166 167 168 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 203 204 205 206 207 208 209 210 211 212 213 |