# NGINX configuration

Subdirectory Proxy Configuration for (NGINX) servers

## Step 1: Modify sites-available config file

Below is an example of configuring your NGINX server sites-enabled entry to route traffic for some paths within your existing domain.

The item you will need to complete:

1. The custom `location` directives that will be provided by us. An example of these can be found [below](/hosting-options/server-path-override/nginx-configuration.md#step-2-example-location-directives).

```
server {
  listen 80;
  server_name customerdomain.com;

  # start configuration entries..

  <ADD_YOUR_LOCATION_DIRECTIVES here>

  # continue normal configuration..
}
```

## Step 2: Example location directives

This is just an example of the location directives that would be added to serve the path and some of the other assets (styles, images, etc) from our platform. The specific location directives you will install will be provided by us.

```
location /your-path/ {
  proxy_set_header Host customerdomain.com;
  proxy_pass http://255.255.255.255:80;
}
```


---

# 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://docs.devhub.com/hosting-options/server-path-override/nginx-configuration.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.
