Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ESAP API Gateway
Manage
Activity
Members
Labels
Plan
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
ESCAPE WP5
ESAP API Gateway
Merge requests
!46
Esap gateway query
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Esap gateway query
esap-gateway-query
into
master
Overview
0
Commits
18
Pipelines
0
Changes
9
Merged
Nico Vermaas
requested to merge
esap-gateway-query
into
master
4 years ago
Overview
0
Commits
18
Pipelines
0
Changes
9
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
63e54011
18 commits,
4 years ago
9 files
+
299
−
59
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
esap/docker/shared/esap_nginx.conf
+
38
−
27
Options
# nginx configuration for esap
# note how this connects directly into the esap_api container on port 8000,
# note how this connects directly into the esap_api container on port 8000,
# this is made possible by the docker-compose 'network:' configuration.
upstream
backend
{
@@ -9,10 +9,10 @@ upstream backend {
server
esap_api
:
8000
;
}
upstream
frontend
{
# note that this is the container name from the docker-compose.yml, and it uses the internal port because we are on a docker network
server
esap
-
gui
:
80
;
}
#
upstream frontend {
#
# note that this is the container name from the docker-compose
-query
.yml, and it uses the internal port because we are on a docker network
#
server esap-gui:80;
#
}
server
{
server_name
localhost
;
@@ -22,32 +22,47 @@ server {
root
/
shared
/
public_html
;
location
/
esap
-
gui
/ {
proxy_pass
http
://
frontend
/;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Forwarded
-
For
$
remote_addr
;
proxy_intercept_errors
on
;
recursive_error_pages
on
;
error_page
404
= @
fallback
;
}
# ===== esap-gui (frontend) configuration =====
# location /esap-gui/ {
# proxy_pass http://frontend/;
#
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_intercept_errors on;
# recursive_error_pages on;
# error_page 404 = @fallback;
# }
# This construction makes it possible to have a 'try_files' combined with a 'proxy_pass'.
# So when a request like "http://sdc.astron.nl/esap-gui/vo-query" fails, because 'vo-query' is not a backend location,
# then the 'error_page' forwards it to a 'try_files', which forwards it to the esap-gui frontend. (where the 'vo-query' route is defined).
location
@
fallback
{
try_files
$
uri
$
uri
/ /
esap
-
gui
/
index
.
html
;
}
#
location @fallback {
#
try_files $uri $uri/ /esap-gui/index.html;
#
}
# ===== proxy to esap-api on port 8000 =====
location
/
esap
-
api
/ {
proxy_pass
http
://
backend
/
esap
-
api
/;
proxy_set_header
Host
sdc
.
astron
.
nl
;
proxy_set_header
X
-
Forwarded
-
For
$
remote_addr
;
# proxy the /static/ url to the frontend container
location
/
static
/ {
# this proxies all calls to /static/ into the frontend container
#proxy_pass http://frontend/static/;
# this proxies all calls to /static/ to the shared static directory (in case of multiple frontends)
alias
/
static
/;
}
# This reflects a change in the Django settings to serve multiple applications: STATIC_URL = '/static_esap/'
# ===== esap-api (backend) configuration =====
# uncomment when the frontend connects to '/esap-api' instead of to 'https://sdc.astron.nl:5555/esap-api'
# location /esap-api/ {
# proxy_pass http://backend/esap-api/;
# proxy_set_header Host sdc.astron.nl;
# proxy_set_header X-Forwarded-For $remote_addr;
# }
# This reflects the Django settings to serve multiple applications: STATIC_URL = '/static_esap/'
location
/
static_esap
/ {
proxy_pass
http
://
backend
/
static_esap
/;
proxy_set_header
Host
sdc
.
astron
.
nl
;
@@ -59,12 +74,8 @@ server {
proxy_pass
http
://
backend
/
oidc
/;
}
location
/
static
/ {
alias
/
static
/;
}
# redirect server error pages to the static page /50x.html
#
error_page
500
502
503
504
/
50
x
.
html
;
Loading