diff options
| author | crupest <crupest@outlook.com> | 2022-11-26 17:21:33 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-11-26 17:21:33 +0800 | 
| commit | 31af13e54a1fa2c669f7d8ecca8a0c8e2d067676 (patch) | |
| tree | 588d8efd20f1e427a9c72ce8fadd8a5dcb0b4879 /template/nginx/root.conf.template | |
| parent | 6259ab6ae42fefc3328d61fd016401342c08a90f (diff) | |
| download | crupest-31af13e54a1fa2c669f7d8ecca8a0c8e2d067676.tar.gz crupest-31af13e54a1fa2c669f7d8ecca8a0c8e2d067676.tar.bz2 crupest-31af13e54a1fa2c669f7d8ecca8a0c8e2d067676.zip  | |
Add crupest-api.
Diffstat (limited to 'template/nginx/root.conf.template')
| -rw-r--r-- | template/nginx/root.conf.template | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/template/nginx/root.conf.template b/template/nginx/root.conf.template index 8214bf7..110def4 100644 --- a/template/nginx/root.conf.template +++ b/template/nginx/root.conf.template @@ -1,9 +1,24 @@ +upstream crupest-api { +    server crupest-api:5000 +} +  server {      listen 443 ssl http2;      listen [::]:443 ssl http2;      server_name ${CRUPEST_DOMAIN};      root /srv/www; + +    location /api { +        proxy_http_version 1.1; +        proxy_set_header Upgrade $http_upgrade; +        proxy_set_header Connection $connection_upgrade; +        proxy_set_header Host $host; +        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +        proxy_set_header X-Forwarded-Proto $scheme; +        proxy_set_header X-Real-IP $remote_addr; +        proxy_pass http://crupest-api; +    }  }  server {  | 
