... | ... | @@ -4,7 +4,7 @@ DBnomics shares publicly its production configuration files and methods, excepte |
|
|
|
|
|
### Nginx virtual host
|
|
|
|
|
|
`/etc/nginx/sites-enabled/api.dev.nomics.world.conf`:
|
|
|
`/etc/nginx/sites-enabled/api.db.nomics.world.conf`:
|
|
|
|
|
|
```nginx
|
|
|
server {
|
... | ... | @@ -16,7 +16,6 @@ server { |
|
|
access_log /var/log/nginx/api.db.nomics.world-access.log combined;
|
|
|
error_log /var/log/nginx/api.db.nomics.world-error.log warn;
|
|
|
|
|
|
location / { return 302 /v21$request_uri; }
|
|
|
location /v21 {
|
|
|
include uwsgi_params;
|
|
|
uwsgi_pass localhost:8021;
|
... | ... | @@ -72,7 +71,7 @@ systemctl restart uwsgi.service |
|
|
|
|
|
The logs of uwsgi applications are in `/var/log/uwsgi/app/`. To check that the service is well started, the last lines of `/var/log/uwsgi/app/dbnomics-api-uwsgi-v21.log` should display something like "spawned uWSGI worker 1 (and the only) (pid: 8936, cores: 1)" and not contain any error (grep for "Traceback" keyword).
|
|
|
|
|
|
To test: open https://api.dev.nomics.world/v21/
|
|
|
To test: open https://api.db.nomics.world/v21/
|
|
|
|
|
|
It should display:
|
|
|
|
... | ... | @@ -83,6 +82,6 @@ It should display: |
|
|
"python_project_name": "DBnomics-API"
|
|
|
},
|
|
|
"apidocs_href": "/apidocs",
|
|
|
"message": "This is the home page of DBnomics Web API. Its documentation is here: https://api.dev.nomics.world/apidocs"
|
|
|
"message": "This is the home page of DBnomics Web API. Its documentation is here: https://api.db.nomics.world/v21/apidocs"
|
|
|
}
|
|
|
``` |