example conf, change domain
This commit is contained in:
parent
b3be02c15c
commit
bbc7bb6033
2 changed files with 31 additions and 4 deletions
27
nginx.example.conf
Normal file
27
nginx.example.conf
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name feed.zenoverse.net;
|
||||
ssl_certificate /etc/letsencrypt/live/feed.zenoverse.net/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/feed.zenoverse.net/privkey.pem;
|
||||
location / {
|
||||
index index.html;
|
||||
root /main/scratch-feed;
|
||||
}
|
||||
location ~ /user/(.*) {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
proxy_pass https://api.scratch.mit.edu/users/$1/projects?limit=40;
|
||||
}
|
||||
location ~ /studio/(.*) {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
proxy_pass https://api.scratch.mit.edu/studios/$1;
|
||||
}
|
||||
location ~ /studio_project/(.*) {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
proxy_pass https://api.scratch.mit.edu/studios/$1/projects?offset=0&limit=40;
|
||||
}
|
||||
location ~ /studio_comment/(.*) {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
proxy_pass https://api.scratch.mit.edu/studios/$1/comments?offset=0&limit=40;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue