docs: add nginx deploy instructions and fix Authorization header config

- Add proxy_set_header Authorization to /api/ location (required or token is stripped)
- Add Step 11 to README explaining how to install the nginx config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-05-02 13:17:19 -04:00
parent 3d409d4a84
commit b73b8c97c6
2 changed files with 16 additions and 2 deletions

View File

@@ -137,7 +137,20 @@ npm run db:generate
npm run db:seed
```
### Step 11 — Run the app
### Step 11 — Configure nginx
The repo includes `nginx.conf` in the project root. Install it as the active site config:
```sh
sudo cp nginx.conf /etc/nginx/sites-available/dental-app
sudo ln -sf /etc/nginx/sites-available/dental-app /etc/nginx/sites-enabled/dental-app
sudo nginx -t && sudo systemctl reload nginx
```
> **Important:** The `/api/` location block must include `proxy_set_header Authorization $http_authorization;`
> Without it, nginx strips the Authorization header and the backend returns "Access denied. No token provided."
### Step 12 — Run the app
Open two terminals: