Page MenuHomeDevCentral

api51.conf
No OneTemporary

api51.conf

# -------------------------------------------------------------
# Webserver
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Site: api51.nasqueron.org
# License: Trivial work, not eligible to copyright
# Source file: roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api51.conf
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
# -------------------------------------------------------------
# Back-end for API services
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
upstream docker-prod-datasources {
server {{ services["docker"]["api"] }}:19080;
}
upstream docker-prod-registry {
server {{ services["docker"]["api"] }}:20080;
}
upstream vault {
server {{ services["vault"] }}:8200;
# 2 servers should be added for HA, with a quorum for a Raft consensus
}
# -------------------------------------------------------------
# api51.nasqueron.org configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
server {
server_name api51.nasqueron.org;
include includes/tls;
ssl_certificate /usr/local/etc/letsencrypt/live/api51.nasqueron.org/fullchain.pem;
ssl_certificate_key /usr/local/etc/letsencrypt/live/api51.nasqueron.org/privkey.pem;
error_log /var/log/www/nasqueron.org/api51-error.log;
access_log /var/log/www/nasqueron.org/api51-access.log;
root /var/51-wwwroot/api;
include includes/letsencrypt;
location / {
location ~ [^/]\.json(/|$) {
include includes/cors-open;
}
}
###
### Disabled services
###
# We don't have access to php-fpm process or to the JSON document
location /servers-log {
return 418;
}
###
### Datasources (the Node.js ones)
###
location /datasources {
proxy_pass http://docker-prod-datasources;
include includes/proxy;
include includes/cors-open;
}
###
### Docker registry
###
location ~ /docker/registry/?$ {
return 302 https://docs.nasqueron.org/docker-registry-api/;
}
location /docker/registry {
proxy_pass http://docker-prod-registry/;
include includes/proxy;
include includes/cors-open;
}
###
### Vault certificate information
###
location /infra/security/pki/root/crl {
proxy_pass https://vault/v1/pki_root/crl;
include includes/proxy;
}
location /infra/security/pki/vault/crl {
proxy_pass https://vault/v1/pki_vault/crl;
include includes/proxy;
}
location /infra/security/pki/root/ca {
proxy_pass https://vault/v1/pki_root/ca;
include includes/proxy;
}
location /infra/security/pki/vault/ca {
proxy_pass https://vault/v1/pki_vault/ca;
include includes/proxy;
}
}
# -------------------------------------------------------------
# Redirection
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
server {
listen 80;
listen [::]:80;
server_name api51.nasqueron.org;
include includes/letsencrypt;
return 301 https://api51.nasqueron.org$request_uri;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 1, 18:09 (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3121710
Default Alt Text
api51.conf (3 KB)

Event Timeline