---
title: "Path apps"
url: https://docs.corefinity.com/guides/sites/site-settings/path-apps
type: guide
last_updated: 2026-11-13
feature: path-apps
---
# Path apps

Serve a folder, run a second PHP app, send a path to another site or limit a path to listed addresses.

## Before you start

- You can open the site in **Managed Websites**. Anyone who can open a site can change its path apps, including which PHP files run.
- Each environment has its own path apps: choose **Production** or **Staging** in the site header first.
- An environment holds up to 16 path apps and 16 gates.

## Add a path app

1. **Open Path apps**

   Go to **Managed Websites**, choose the site, then **Web server rules** under **Site settings**. Choose the **Path apps** tab, then **Add path app**; on a site with no rules yet, choose **Write rules** first.

   _Screenshot: Web server rules with the Path apps tab chosen on a site with no path apps yet: the counts of path apps and gates used out of 16, the button Add path app, a row of presets, and the Snippets panel on the right._

2. **Start from a preset**

   Choose a preset, then **Next**. A preset only fills the form: every field can be changed before saving.

   _Screenshot: The Add path app dialog, step 1 of 2, with the presets from WordPress admin (FishPig) to IP / host gate and Start blank, and the buttons Cancel and Next._

3. **Fill in the path**

   Enter the **Path**, such as `/blog/`, and the fields the preset needs: a **Folder**, a **Target** or **Allowed addresses**. Enter a **Label**, which names it in the Control Panel only, then choose **Done**.

   _Screenshot: The Add path app dialog, step 2, for the Static directory preset: Path, Type, Folder, the file types, Rate limit, Methods, Password, Allowed addresses, Hosts and Label, and the buttons Back, Cancel, Show nginx and Done._

4. **Save the rules**

   The path app is listed as **Unsaved: new**. Choose **Save**, review the change and choose **Save** again, as in [Web server rules](/guides/sites/site-settings/web-server-rules).

The path app is checked first, then applies straight away.

## Choose a preset

| Preset                        | Use it to                                                                                 |
| ----------------------------- | ----------------------------------------------------------------------------------------- |
| **WordPress admin (FishPig)** | Run WordPress's admin, sign-in and REST API under a path.                                 |
| **WordPress full**            | Run a WordPress site under a path of another site.                                        |
| **Legacy PHP directory**      | Run the PHP files you list from a folder. Every other PHP file under the path is blocked. |
| **Static directory**          | Serve the files in a folder, with no PHP.                                                 |
| **Another site (proxy)**      | Serve the path from another website over HTTPS. Visitors stay on your address.            |
| **Single PHP entry**          | Run one PHP file.                                                                         |
| **IP / host gate**            | Let only listed addresses reach a path or a hostname. Everyone else gets a 403.           |
| **Start blank**               | Fill in every field yourself.                                                             |

## Change or remove a path app

1. **Use the row's buttons**

   Choose **Edit** on its row to change it, or open its **…** menu and choose **Remove**. Then choose **Save**.

   _Screenshot: The Path apps tab with saved path apps: the counts used out of 16, Add path app, then the path apps /press-kit/ and /help/ and the gate /wp-admin/, each with its type, its settings, the buttons Edit and Show nginx and a … menu._

> **Note:** Addresses on the environment's [firewall](/guides/sites/access-and-security/firewall) list with **SSH and website** or **Website only** access always skip a path app's password and pass its gates. An **SSH only** address does not.

## Automate this

**API:** [Replace a site's Nginx rules](https://docs.corefinity.com/api/reference/site-settings/replace-site-nginx-rules.md), scope `write`

```bash
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/nginx-rules \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "WordPress admin under /wp/",
    "path_apps": [
      {
        "label": "Blog admin",
        "php": {
          "dir_index": [
            "wp-admin/"
          ],
          "entries": [
            "wp-admin/*.php",
            "wp-login.php"
          ],
          "router": [
            "wp-json/"
          ]
        },
        "prefix": "/wp/",
        "preset": "wordpress-admin",
        "root": "htdocs",
        "type": "php-app"
      }
    ],
    "version": 0
  }'
```

**MCP:** [`corestack_nginx_rules_update`](https://docs.corefinity.com/mcp/tools/corestack_nginx_rules_update.md), scope `write`

```json
{
  "name": "corestack_nginx_rules_update",
  "arguments": {
    "site_id": 4211,
    "version": 7,
    "content": {
      "server": "location /wp-content/uploads/private/ {\n    deny all;\n}\n"
    },
    "note": "Keep private uploads private"
  }
}
```

**Control Panel:** Managed Websites › your site › Site settings › Web server rules ([https://manage.corefinity.com/go/nginx-rules](https://manage.corefinity.com/go/nginx-rules))

## Related

- [Web server rules](/guides/sites/site-settings/web-server-rules): Add your own nginx rules to a site.
- [Password protection](/guides/sites/access-and-security/password-protection): Put a login in front of an environment.
- [Firewall](/guides/sites/access-and-security/firewall): Allow an IP address to reach a site.
