-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for nginx vhost config drop-ins
Signed-off-by: Jonas <[email protected]>
- Loading branch information
Showing
4 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/.vscode | ||
/data/nginx/vhost.d/ | ||
/data/ssl/ | ||
/data/shared/ | ||
/workspace/ | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Customize nginx config | ||
|
||
## Add custom config for a virtualhost config | ||
|
||
Add a config snippet to `data/nginx/vhost.d/<vhost-name>`, it will be included in the respective vhost config automatically. | ||
|
||
For example to redirect all requests to `/apps.*/text` to a `vite serve` process on the docker host, add the following to `data/nginx/vhost.d/nextcloud.local`: | ||
|
||
``` | ||
location ~* ^/apps.*/text/ { | ||
rewrite ^/apps.*/text/(.*) /$1 break; | ||
proxy_pass http://host.docker.internal:5173; | ||
# fallback to nextcloud server if vite serve doesn't answer | ||
error_page 502 = @fallback; | ||
} | ||
location @fallback { | ||
proxy_pass http://nextcloud.local; | ||
} | ||
``` |