-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a very early piece of documentation so that I can edit it to r…
…eflect the config for v1.2.0
- Loading branch information
Mike Lynch
authored and
Mike Lynch
committed
Feb 4, 2020
1 parent
5a797e3
commit 9f4bbb3
Showing
2 changed files
with
81 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
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,76 @@ | ||
OCFL-nginx | ||
========== | ||
|
||
(Documenting this before I write it) | ||
|
||
|
||
## ocfl.conf | ||
|
||
Sample config for a server with two ocfl repositories in the same nginx root: | ||
|
||
/etc/share/nginx/html/myrepo1_ocfl | ||
/etc/share/nginx/html/myrepo2_ocfl | ||
|
||
Each repo has been indexed into a solr core with the names mycore1 and mycore2. | ||
|
||
The Solr server is on solr.backend:8983 | ||
|
||
server { | ||
listen 443; | ||
server_name my.ocfl-nginx.org; | ||
|
||
set $ocfl_root /etc/share/nginx/html; | ||
set $ocfl_autoindex ro-crate-preview.html; | ||
|
||
location /solr/ { | ||
proxy_pass http://solr.backend:8983; | ||
} | ||
|
||
location /myrepo1/ { | ||
set $ocfl_repo myrepo1_ocfl; | ||
set $ocfl_solr mycore1 | ||
js_content ocfl; | ||
} | ||
|
||
location /myrepo2/ { | ||
set $ocfl_repo myrepo2_ocfl; | ||
set $ocfl_solr mycore2 | ||
js_content ocfl; | ||
} | ||
|
||
location /myrepo2_ocfl/ { | ||
root $ocfl_root; | ||
} | ||
|
||
location /myrepo1_ocfl/ { | ||
root $ocfl_root; | ||
} | ||
|
||
} | ||
|
||
Sample config for a server with one ocfl repository at /etc/share/nginx/html/myrepo_ocfl which is indexed in a static json file called index.json. Note that the js content handler for this use case is ocfl_json | ||
|
||
|
||
server { | ||
listen 443; | ||
server_name my.ocfl-nginx.org; | ||
|
||
set $ocfl_root /etc/share/nginx/html; | ||
set $ocfl_autoindex ro-crate-preview.html; | ||
|
||
location /solr/ { | ||
proxy_pass http://solr.backend:8983; | ||
} | ||
|
||
location /myrepo/ { | ||
set $ocfl_repo myrepo_ocfl; | ||
set $ocfl_index index.json | ||
js_content ocfl_json; | ||
} | ||
location /myrepo1_ocfl/ { | ||
root $ocfl_root; | ||
} | ||
|
||
} | ||
|