... | ... | @@ -2,6 +2,8 @@ DBnomics shares publicly its production configuration files and methods, excepte |
|
|
|
|
|
## Web API
|
|
|
|
|
|
This is the configuration we use for https://git.nomics.world/dbnomics/dbnomics-api
|
|
|
|
|
|
### Nginx virtual host
|
|
|
|
|
|
`/etc/nginx/sites-enabled/api.db.nomics.world.conf`:
|
... | ... | @@ -112,3 +114,41 @@ To test, open https://api.db.nomics.world/v22/ or any previous version deployed. |
|
|
"message": "This is the home page of DBnomics Web API. Its documentation is here: https://api.db.nomics.world/v22/apidocs"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## Web UI
|
|
|
|
|
|
This is the configuration we use for https://git.nomics.world/dbnomics/dbnomics-ui
|
|
|
|
|
|
### Nginx virtual host
|
|
|
|
|
|
`/etc/nginx/sites-enabled/db.nomics.world.conf`:
|
|
|
|
|
|
```nginx
|
|
|
server {
|
|
|
listen 80;
|
|
|
listen [::]:80;
|
|
|
|
|
|
server_name db.nomics.world;
|
|
|
|
|
|
access_log /var/log/nginx/db.nomics.world-access.log combined;
|
|
|
error_log /var/log/nginx/db.nomics.world-error.log warn;
|
|
|
|
|
|
location /dashboard {
|
|
|
alias /home/cepremap/dbnomics-dashboard/;
|
|
|
}
|
|
|
|
|
|
location / {
|
|
|
root /home/cepremap/dbnomics-ui-static;
|
|
|
try_files $uri /index.html;
|
|
|
}
|
|
|
|
|
|
listen 443 ssl; # managed by Certbot
|
|
|
ssl_certificate /etc/letsencrypt/live/db.nomics.world-0001/fullchain.pem; # managed by Certbot
|
|
|
ssl_certificate_key /etc/letsencrypt/live/db.nomics.world-0001/privkey.pem; # managed by Certbot
|
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
|
|
|
if ($scheme != "https") {
|
|
|
return 301 https://$host$request_uri;
|
|
|
} # managed by Certbot
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |