CorefinityCorefinityDocs
Open the Control PanelControl Panel
Site settings · 4 of 8

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

On this page

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.

  2. Start from a preset

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

  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.

  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.

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

Choose a preset

PresetUse it to
WordPress admin (FishPig)Run WordPress's admin, sign-in and REST API under a path.
WordPress fullRun a WordPress site under a path of another site.
Legacy PHP directoryRun the PHP files you list from a folder. Every other PHP file under the path is blocked.
Static directoryServe 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 entryRun one PHP file.
IP / host gateLet only listed addresses reach a path or a hostname. Everyone else gets a 403.
Start blankFill 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.

Addresses on the environment's 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

Path apps

Saves the hooks sent in content at the version you read: a hook left out stays as it is, and "" or null clears it.

PUT/api/corestack/sites/{site}/nginx-rules
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
  }'
Was this helpful?
Open in ClaudeOpen in ChatGPT