Run Craft behind a reverse proxy on subpath
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
Description
When running craft behind a reverse proxy in this manner:
/ => frontend
/backend => Craft
Calls to index.php always resolve to the root of the domain and therefore fail. Is there a way to solve this problem. Without placing craft in that subdirectory. Background we run Craft and SSR Vue.js Docker Containers along. To avoid CORS Issues we would like to serve the Craft container from a subpath of the domain.
Additional info
- Craft version: 3.7
- PHP version: 7.4
- Database driver & version: Mysql 5.6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Craft 3.7 setup with PHP 7.4, Docker containers, and the reverse-proxy mapping of / to the frontend and /backend to Craft. Trace how requests to index.php resolve under that subpath; done when Craft can be served at /backend without being installed there and the frontend remains at /.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, php
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100