modif setup
This commit is contained in:
BIN
setup/adminapx_1.zip
Normal file
BIN
setup/adminapx_1.zip
Normal file
Binary file not shown.
@@ -5,7 +5,7 @@ pid /var/run/nginx.pid;
|
||||
#include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
worker_connections {{nginx.worker_connections}};
|
||||
}
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
@@ -37,7 +37,6 @@ http {
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
{{#nginx.include}}
|
||||
include {{{.}}};
|
||||
{{/nginx.include}}
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /home/{{sudoerUser}}/apxtowns/{{townId}}-{{nationId}}/conf/nginx/*.conf;
|
||||
}
|
@@ -1,12 +1,12 @@
|
||||
server {
|
||||
server_name {{#dns}} {{.}} {{/dns}};
|
||||
access_log {{{nginx.logs}}}.access.log main;
|
||||
access_log {{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/log/nginx/{{tribeId}}_{{website}}.access.log main;
|
||||
|
||||
set $trackme 0;
|
||||
if ( $uri ~ ^/trk/ ){
|
||||
set $trackme 1;
|
||||
}
|
||||
access_log {{{nginx.logs}}}.trk.log tracker if=$trackme ;
|
||||
access_log {{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/log/nginx/{{tribeId}}_{{website}}.trk.log tracker if=$trackme ;
|
||||
location ~* /trk/ {
|
||||
if ( $uri ~ ^/trk/redirect ){
|
||||
return 301 $arg_url;
|
||||
@@ -15,52 +15,36 @@ location ~* /trk/ {
|
||||
}
|
||||
|
||||
location /Checkjson.js {
|
||||
alias {{{dirapi}}}/api/models/Checkjson.js;
|
||||
alias {{foldertowns}}/{{townId}}-{{nationId}}/apxtri/models/Checkjson.js;
|
||||
}
|
||||
location ~* /nationchains/(blocks|pagans|towns|nations)/ {
|
||||
# Warning: never add tribes for keeping it private
|
||||
root {{{dirapi}}}/;
|
||||
root {{foldertowns}}/{{townId}}-{{nationId}}/nationchains/;
|
||||
}
|
||||
location ~* /nationchains/models/ {
|
||||
rewrite /nationchains/models/(.*$) /$1 break;
|
||||
root {{{dirapi}}}/api/models/lg/;
|
||||
root {{foldertowns}}/{{townId}}-{{nationId}}/apxtri/models/lg/;
|
||||
}
|
||||
location ~* /nationchains/schema/ {
|
||||
#outside of nationchains for git purpose
|
||||
rewrite /nationchains/schema/(.*$) /$1 break;
|
||||
root {{{dirapi}}}/adminapi/schema/;
|
||||
root {{{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/adminapi/schema/;
|
||||
}
|
||||
location ~* /{{tribeId}}/schema/{
|
||||
rewrite /{{tribeId}}/schema/(.*$) /$1 break;
|
||||
root {{dirtown}}/tribes/{{tribeId}}/schema/;
|
||||
root {{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/{{tribeId}}/schema/;
|
||||
}
|
||||
|
||||
location ~* /{{tribeId}}/models/{
|
||||
rewrite /{{tribeId}}/models/(.*$) /$1 break;
|
||||
root {{dirtown}}/tribes/{{tribeId}}/api/models/lg/;
|
||||
}
|
||||
|
||||
# /plugins/pluginame/components/xxx?plugin=pluginname&pluginkey=key
|
||||
# acess if exist pluginkey
|
||||
location /plugins/ {
|
||||
add_header X-debug "plugins local $arg_plugin/keys/$arg_pluginkey sent";
|
||||
root {{{nginx.fswww}}}/plugins/;
|
||||
if (-f {{{nginx.fswww}}}/plugins/$arg_plugin/keys/$arg_pluginkey) {
|
||||
rewrite /plugins/([^/]+)/components/([^\?]+) /$1/components/$2 break;
|
||||
}
|
||||
return 403 "No valid token access for plugin:$arg_plugin with token:$arg_pluginkey please ask your admin";
|
||||
root {{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/{{tribeId}}/api/models/lg/;
|
||||
}
|
||||
|
||||
location /cdn/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public";
|
||||
rewrite /cdn/(.*$) /$1 break;
|
||||
root {{{nginx.fswww}}}/cdn/;
|
||||
}
|
||||
|
||||
location /spacedev/ {
|
||||
rewrite /spacedev/(.*$) /$1 break;
|
||||
root {{{nginx.fswww}}}spacedev/{{{nginx.website}}}/dist/;
|
||||
root {{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/{{tribeId}}/www//cdn/;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
@@ -72,7 +56,7 @@ include proxy_params;
|
||||
|
||||
location /apxwebapp/ {
|
||||
rewrite /apxwebapp/(.*$) /$1 break;
|
||||
root {{{dirapxwebapp}}}/apxwebapp/;
|
||||
root {{foldertowns}}/apxwebapp/;
|
||||
index index.html index_en.html;
|
||||
}
|
||||
|
||||
@@ -80,12 +64,12 @@ index index.html index_en.html;
|
||||
option
|
||||
|
||||
location / {
|
||||
{{#nginx.private}}
|
||||
auth_basic "Mot de passe {{nginx.privatelogin}}";
|
||||
auth_basic_user_file {{dirtown}}/tribes/{{tribeId}}/.htpasswd;
|
||||
{{/nginx.private}}
|
||||
root {{{nginx.fswww}}}/{{{nginx.website}}};
|
||||
index index.html {{{nginx.pageindex}}};
|
||||
{{#private}}
|
||||
auth_basic "Mot de passe {{privatelogin}}";
|
||||
auth_basic_user_file {{{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/{{tribeId}}/.htpasswd;
|
||||
{{/private}}
|
||||
root {{foldertowns}}/{{townId}}-{{nationId}}/nationchains/tribes/{{tribeId}}/www/{{{website}}};
|
||||
index index.html {{{pageindex}}};
|
||||
}
|
||||
error_page 404 /404.html;
|
||||
# redirect server error pages to the static page /50x.html
|
55
setup/conf/townconf.json
Normal file
55
setup/conf/townconf.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{ "chaintonation":false,
|
||||
"foldertowns":"xx/apxtowns",
|
||||
"nationId": "xx",
|
||||
"townId": "xx",
|
||||
"sudoerUser": "xx",
|
||||
"dns": ["xx"],
|
||||
"towns": [
|
||||
{ "townId": "wall", "nationId": "ants", "dns": "wall-ants.ndda.fr" }
|
||||
],
|
||||
"api": {
|
||||
"port": 3020,
|
||||
"languages": ["en", "fr"],
|
||||
"exposedHeaders": [
|
||||
"xdays",
|
||||
"xhash",
|
||||
"xalias",
|
||||
"xlang",
|
||||
"xtribe",
|
||||
"xapp",
|
||||
"xuuid"
|
||||
],
|
||||
"nationObjects": [
|
||||
"schema",
|
||||
"blocks",
|
||||
"nations",
|
||||
"towns",
|
||||
"tribes",
|
||||
"pagans"
|
||||
],
|
||||
"unittesting": ["middlewares", "models", "routes", "nationchains"],
|
||||
"appset": { "trust proxy": true },
|
||||
"bodyparse": {
|
||||
"urlencoded": { "limit": "50mb", "extended": true },
|
||||
"json": { "limit": "500mb" }
|
||||
}
|
||||
},
|
||||
"nginx": {
|
||||
"restart": "sudo systemctl restart nginx",
|
||||
"worker_connections": 1024
|
||||
},
|
||||
"emailcontact":"wall-ants@ndda.fr",
|
||||
"smtp": {
|
||||
"host": "in-v3.mailjet.com",
|
||||
"port": "587",
|
||||
"auth": {
|
||||
"user": "??",
|
||||
"password": "??"
|
||||
}
|
||||
},
|
||||
"sms": {
|
||||
"url": "https://api.mailjet.com/v4/sms-send",
|
||||
"Token": "",
|
||||
"From": ""
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user