major update

This commit is contained in:
2023-11-05 12:03:25 +01:00
parent 2edd592ef9
commit 6291d5239e
91 changed files with 6667 additions and 1286 deletions

View File

@@ -6,7 +6,7 @@
"api": {
"port": 3020,
"languages": ["en", "fr"],
"exposedHeaders": ["xdays", "xhash", "xalias", "xlang", "xtribe", "xapp"],
"exposedHeaders": ["xdays", "xhash", "xalias", "xlang", "xtribe", "xapp","xuuid"],
"nationObjects": [
"schema",
"blocks",

View File

@@ -1,6 +1,6 @@
user {{{sudoerUser}}};
worker_processes auto;
error_log {{{ }}}/var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
#include /etc/nginx/modules-enabled/*.conf;
@@ -15,16 +15,26 @@ http {
'"$http_user_agent"';
log_format mainold '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format trace '$remote_addr - $remote_user [$time_local] '
'$host "$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$http_x_forwarded_for" $request_id';
access_log /var/log/nginx/access.log main;
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format track escape=json '{"time":"$time_iso8601","alias":"$sent_http_xalias","uuid":"$sent_http_xuuid",'
'"lg":"$sent_http_xlang","consentcookie":"$sent_http_consentcookie",'
'"request_filename":"$request_filename","request":"$request",'
'"args":"$args","remoteaddr":"$remote_addr","httpxforwardedfor":"$http_x_forwarded_for",'
'"httpreferer":"$http_referer","httpuseragent":"$http_user_agent"}';
#access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 4 32k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/x-font-ttf application/javascript font/eot font/opentype image/svg+xml image/x-icon text/plain;
##
# Virtual Host Configs
##

View File

@@ -2,10 +2,22 @@ server {
server_name {{#dns}} {{.}} {{/dns}};
access_log {{{nginx.logs}}}.access.log main;
location ~* /trk/ {
access_log {{{nginx.logs}}}.trk.log track;
if ( $uri ~ ^/trk/redirect ){
return 301 $arg_url;
}
rewrite ^/trk/(.*)$ /$1;
}
location ~* /nationchains/(blocks|pagans|towns|nations)/ {
# Warning: never add tribes for keeping it private
root {{{dirapi}}}/;
}
location ~* /nationchains/models/ {
rewrite /nationchains/models/(.*$) /$1 break;
root {{{dirapi}}}/api/models/lg/;
}
location ~* /nationchains/schema/ {
#outside of nationchains for git purpose
rewrite /nationchains/schema/(.*$) /$1 break;
@@ -23,8 +35,10 @@ return 403 "No valid token access for plugin:$arg_plugin with token:$arg_plugink
}
location /cdn/ {
rewrite /cdn/(.*$) /$1 break;
root {{{nginx.fswww}}}/cdn/;
expires 1y;
add_header Cache-Control "public";
rewrite /cdn/(.*$) /$1 break;
root {{{nginx.fswww}}}/cdn/;
}
location /spacedev/ {
@@ -38,6 +52,13 @@ proxy_pass http://localhost:{{{api.port}}};
proxy_redirect off;
include proxy_params;
}
location /apxwebapp/ {
rewrite /apxwebapp/(.*$) /$1 break;
root {{{dirapxwebapp}}}/apxwebapp/;
index index.html index_en.html;
}
#to add htpasswd install apache2-utils => sudo htpasswd -c dirtown/tribes/tribeId/.htpasswd loginname passwd see man for
option