# APACHE Web Server

## Step 1 <a href="#step-1" id="step-1"></a>

Open the [**.htaccess file generator**](http://toshop.com/go/c.htaccess-generator), enter your GoodAccess Gateway IP and click on **Generate .htaccess File.**

## Step 2

Set **I want to allow these IP addresses and ban everyone else.**

## Step 3

Create a .htaccess file with the generated content and copy it to your web server. Place it in the directory containing the part of the website that should be protected.

{% hint style="warning" %}
**Please note:** In case the .htaccess file doesn't work, check whether your APACHE is configured to **AllowOverride All**. See [APACHE AllowOverride documentation](https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride).
{% endhint %}

{% hint style="info" %}
There are more ways to configure your APACHE web server, allowing access only through the GoodAccess network. See [APACHE Access Control documentation](https://httpd.apache.org/docs/2.4/howto/access.html) and [APACHE .htaccess file documentation](https://httpd.apache.org/docs/2.4/howto/htaccess.html).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.goodaccess.com/configuration-guides/ip-whitelisting/apache-web-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
