Changing the Ghost admin path from /ghost
user: how feasble is it to change the directory name for the backend of our ghost installation? For example, I want use https://myconversationswith.ai/share or https://myconversationswith.ai/post instead of https://myconversationswith.ai/ghost
assistant: Short answer: changing Ghost’s admin path away from `/ghost` isn’t supported. Ghost hard‑codes the admin client at `/ghost`, and there’s no config or `routes.yaml` setting to move it to `/share` or `/post`. You *can* change the **domain** used for admin (e.g., `https://admin.myconversationswith.ai/ghost`) via the `admin.url` setting, but not the path.
That said, you’ve got a couple safe, clean workarounds:
### Option A — Keep `/ghost`, add a friendly alias
Create a pretty alias like `/share` that **redirects** to `/ghost` (or proxies it). This doesn’t change Ghost; it’s just NGINX.
```nginx
# Alias: /share -> /ghost (simple redirect)
location = /share { return 301 /ghost; }
location = /share/ { return 301 /ghost/; }
```
If you insist on a transparent alias (no URL change in the bar), you can proxy, but I don’t recommend it because the admin SPA assumes `/ghost` and future updates could break. A 301 is safer.
### Option B — Put admin on a subdomain (recommended)
Point admin to `https://admin.myconversationswith.ai/ghost` and hide `/ghost` on the main site. This *is* supported:
1) In your Ghost config:
```json
{
"url": "https://myconversationswith.ai",
"admin": { "url": "https://admin.myconversationswith.ai/" }
}
```
(Then restart Ghost.)
2) NGINX: create a server block for `admin.myconversationswith.ai` that proxies to your Ghost instance, and on the main site either 404 or 301 for `/ghost` to reduce exposure.
This approach is the one Ghost folks regularly point to: you can’t change `/ghost`, but you *can* change the **host** it lives on (subdomain).
### Why not `/post`?
`/post` would collide conceptually with public content URLs (and Ghost already uses `/p/` for previews). More importantly, Ghost doesn’t allow changing the admin path, so trying to “move” it there is brittle.
If you want, I can draft the exact NGINX snippets for your current box to (a) add `/share → /ghost` and (b) stand up `admin.myconversationswith.ai` while locking down `/ghost` on t…
user: we are not using admin.myconversationswith.ai I don't know where you get that idea that that subdomain is in the equation. Additionally, you are the last person to configure our nameserver zones on ns1.mcwai.net and ns3.mcwai.net
Can we make a simple alias share with ghost. This is not a 301 redirect is it?
assistant: Gotcha—no subdomain. Yes, you can make a **non‑redirecting alias** so `/share` serves the Ghost admin that actually lives at `/ghost`. This keeps the browser’s URL on `/share` while NGINX internally routes to `/ghost`.
### NGINX snippet (transparent alias)
Add this inside your `server { ... }` for `myconversationswith.ai` (alongside your existing Ghost proxy):
```nginx
# Exact /share (no trailing slash) → internally serve /ghost/
location = /share {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_redirect off;
proxy_pass http://127.0.0.1:2368/ghost/;
}
# Anything under /share/... → internally map to /ghost/...
location ^~ /share/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_redirect off;
# NOTE the trailing slashes: /share/* becomes /ghost/* on the upstream
proxy_pass http://127.0.0.1:2368/ghost/;
}
```
Then:
```bash
sudo nginx -t && sudo systemctl reload nginx
```
### Heads-up (so it doesn’t surprise you)
- Ghost’s admin SPA is **built for `/ghost`**. Even with the alias, the app may still request assets and API endpoints at absolute `/ghost/...`. That’s fine—you’ll keep those paths accessible.
- Because of that, you **can’t also block `/ghost`** on the same host if you’re using `/share` as a pure alias; the admin needs `/ghost` for its own assets/routes. (Hiding `/ghost` only works cleanly if admin lives on another host.)
If you want, I can wrap this into a quick `~/nginx-add-share-alias.sh` that finds your server block and drops the stanza in safely with a backup and emoji status output—just say the word.
user: actually, on second thought. perhaps we just leave this alone. and if anything make the share directory a simple home page that has big button links to what form to share. such as Ghost Blog or drop in a json or zip archive. Or Markdown share or other formats we eventually develop
assistant: Love this pivot 👍 — let’s make `/share` a simple, static landing page with big “Share” buttons while leaving Ghost’s `/ghost` admin untouched.
Below is a drop‑in script that:
- Creates `/var/www/share/index.html` with a clean landing page + light/dark toggle (sun/moon in top‑right, like you asked across all pages).
- Adds an NGINX **static** location for `/share` (no proxying, doesn’t touch Ghost).
- Backs up your NGINX server config to `/home/adam/backups/…` before editing.
- Inserts a one‑line `include` into the correct server block for `myconversationswith.ai`.
- Validates NGINX config; rolls back automatically if the test fails.
- Emoji status all the way. 😎
Run this exactly as you like it (single-line create + chmod + run):
```
nano ~/share-landing.sh && chmod +x ~/share-landing.sh && ~/share-landing.sh
```
Paste this into the editor when it opens:
```bash
#!/usr/bin/env bash
set -euo pipefail
DOMAIN="myconversationswith.ai"
SHARE_ROOT="/var/www/share"
SNIPPET="/etc/nginx/snippets/share-landing.conf"
BACKUP_DIR="/home/adam/backups"
TS="$(date +%Y%m%d-%H%M%S)"
echo "🚀 Starting /share landing page setup for ${DOMAIN}"
# 1) Make share root & HTML
echo "📂 Creating ${SHARE_ROOT}"
sudo mkdir -p "${SHARE_ROOT}"
sudo tee "${SHARE_ROOT}/index.html" >/dev/null <<'HTML'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Share • My Conversations with AI</title>
<style>
:root { --bg:#0b0c0f; --fg:#e8e8ea; --card:#14161a; --muted:#a7acb6; --btn:#2563eb; --btnfg:#fff; }
[data-theme="light"] { --bg:#f7f7fb; --fg:#111827; --card:#ffffff; --muted:#4b5563; --btn:#2563eb; --btnfg:#fff; }
* { box-sizing:border-box; }
html,body { height:100%; margin:0; }
body { background:var(--bg); color:var(--fg); font:16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji"; }
…
Showing first 6 of 8 messages. View the full conversation at https://mcwai.org/ai-conversation/changing-the-ghost-admin-path-from-ghost