Page MenuHomeDevCentral

D3172.diff
No OneTemporary

D3172.diff

diff --git a/pillar/paas/alkane/windriver/main.sls b/pillar/paas/alkane/windriver/main.sls
--- a/pillar/paas/alkane/windriver/main.sls
+++ b/pillar/paas/alkane/windriver/main.sls
@@ -96,4 +96,5 @@
- mediawiki
nasqueron.org:
+ - api51
- tools51
diff --git a/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf b/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf
--- a/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf
+++ b/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf
@@ -57,8 +57,10 @@
include includes/letsencrypt;
- location ~ [^/]\.json(/|$) {
- include includes/cors-open;
+ location / {
+ location ~ [^/]\.json(/|$) {
+ include includes/cors-open;
+ }
}
location /datasources {
@@ -117,37 +119,3 @@
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;
- }
-}
diff --git a/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf b/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api51.conf
copy from roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf
copy to roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api51.conf
--- a/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf
+++ b/roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api51.conf
@@ -2,9 +2,9 @@
# Webserver
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Site: api.nasqueron.org
+# Site: api51.nasqueron.org
# License: Trivial work, not eligible to copyright
-# Source file: roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api.conf
+# Source file: roles/webserver-alkane/nginx/files/vhosts/nasqueron.org/api51.conf
# -------------------------------------------------------------
#
# <auto-generated>
@@ -32,56 +32,51 @@
}
# -------------------------------------------------------------
-# api.nasqueron.org configuration
+# api51.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;
+ server_name api51.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;
+ 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/api-error.log;
- access_log /var/log/www/nasqueron.org/api-access.log;
+ error_log /var/log/www/nasqueron.org/api51-error.log;
+ access_log /var/log/www/nasqueron.org/api51-access.log;
- root /var/wwwroot/nasqueron.org/api;
+ root /var/51-wwwroot/api;
include includes/letsencrypt;
- location ~ [^/]\.json(/|$) {
- include includes/cors-open;
+ 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;
}
- 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;
- }
+ ###
+ ### Docker registry
+ ###
location ~ /docker/registry/?$ {
return 302 https://docs.nasqueron.org/docker-registry-api/;
@@ -118,6 +113,10 @@
}
}
+# -------------------------------------------------------------
+# Redirection
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
server {
listen 80;
listen [::]:80;
@@ -127,27 +126,3 @@
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

Mime Type
text/plain
Expires
Fri, Feb 7, 21:04 (5 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2397155
Default Alt Text
D3172.diff (6 KB)

Event Timeline