Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This answer assumes you're using Apache 2.1 or later:</p> <p>With the <code>mod_authz_host</code> module, you can do access control by hostname in .htaccess or in the &lt;Location> or &lt;Directory> section of your httpd.conf file, for example:</p> <pre><code>&lt;Location /&gt; Allow from apache.org Allow from .net example.edu &lt;/Location&gt; </code></pre> <p>Note that you can use partial domain names here, so www.apache.org would be allowed access in this example.</p> <p>To ensure that you have <code>mod_authz_host</code> installed, check for a line similar to the following in your httpd.conf:</p> <pre><code>LoadModule authz_host_module modules/mod_authz_host.so </code></pre> <p>One downside with this is that it will do a reverse lookup for each access, which may or may not be a performance issue for you.</p> <p>Another option is to restrict by User-Agent. However, this is an unreliable technique, because the <code>User-Agent</code> can be very easily spoofed. But it may be OK for your purposes depending on your paranoia level :D</p> <p>To restrict by <code>User-Agent</code>, you need to make sure you're loading the <code>mod_setenvif</code> module in addition to the <code>mod_authz_host</code> module. Check for a line similar to the following in your httpd.conf:</p> <pre><code>LoadModule setenvif_module modules/mod_setenvif.so </code></pre> <p>Then, you can configure the access control in &lt;Location>, &lt;Directory>, or .htaccess as follows:</p> <pre><code>SetEnvIf User-Agent ^facebookexternalhit/1\.1 let_me_in &lt;Location /&gt; Order Deny,Allow Deny from all Allow from env=let_me_in &lt;/Location&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload