Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11726179
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
index 5087510..48a3b3a 100644
--- a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
+++ b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
@@ -1,137 +1,153 @@
# -------------------------------------------------------------
# Webserver
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Site: api.nasqueron.org
# License: Trivial work, not eligible to copyright
# Source file: roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.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 172.27.27.5:19080;
+}
+
+upstream docker-prod-registry {
+ server 172.27.27.5:20080;
+}
+
upstream vault {
server 172.27.27.7:8200;
# 2 servers should be added for HA, with a quorum for a Raft consensus
}
+# -------------------------------------------------------------
+# api.nasqueron.org configuration
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
server {
listen 80;
listen [::]:80;
server_name api.nasqueron.org;
return 301 https://api.nasqueron.org$request_uri;
}
server {
server_name api.nasqueron.org;
include includes/tls;
ssl_certificate /usr/local/etc/letsencrypt/live/api.nasqueron.org/fullchain.pem;
ssl_certificate_key /usr/local/etc/letsencrypt/live/api.nasqueron.org/privkey.pem;
error_log /var/log/www/nasqueron.org/api-error.log;
access_log /var/log/www/nasqueron.org/api-access.log;
root /var/wwwroot/nasqueron.org/api;
include includes/letsencrypt;
location ~ [^/]\.json(/|$) {
include includes/cors-open;
}
location /datasources {
- proxy_pass http://docker-002:19080;
+ proxy_pass http://docker-prod-datasources;
include includes/proxy;
include includes/cors-open;
}
location = /servers-log/all.json {
include includes/cors-open-no-cache;
alias /srv/api/data/servers-log-all.json;
}
location /servers-log {
# Mount the microservice to /servers-log,
# removing the URL from the document URI.
rewrite ^/servers\-log/?(.*)$ /$1 break;
fastcgi_pass unix:/var/run/web/api.nasqueron.org/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME /srv/api/servers-log/src/public/index.php;
include fastcgi_params;
}
location ~ /docker/registry/?$ {
return 302 https://docs.nasqueron.org/docker-registry-api/;
}
location /docker/registry {
- proxy_pass http://docker-001.nasqueron.org:20080/;
+ 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;
}
}
server {
listen 80;
listen [::]:80;
server_name api51.nasqueron.org;
include includes/letsencrypt;
return 301 https://api51.nasqueron.org$request_uri;
}
server {
server_name api51.nasqueron.org;
include includes/tls;
ssl_certificate /usr/local/etc/letsencrypt/live/www51.nasqueron.org/fullchain.pem;
ssl_certificate_key /usr/local/etc/letsencrypt/live/www51.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 ~ [^/]\.json(/|$) {
include includes/cors-open;
}
location = /servers-log/all.json {
include includes/cors-open;
alias /tmp/servers-log-all.json;
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Sep 19, 00:50 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2992009
Default Alt Text
(4 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment