modif towns
This commit is contained in:
48
nationschainssave/www/adminapx/nginx/modelwebsite.conf.mustache
Executable file
48
nationschainssave/www/adminapx/nginx/modelwebsite.conf.mustache
Executable file
@@ -0,0 +1,48 @@
|
||||
server {
|
||||
server_name {{#dns}} {{.}} {{/dns}};
|
||||
access_log {{{dirname}}}/{{{nginx.fswww}}}logs/nginx/{{{nginx.website}}}.{{{nginx.tribeid}}}.access.log main;
|
||||
|
||||
location ~* /nationchains/(schema|blocks|pagans|towns|nations)/ {
|
||||
# Warning: never add tribes for keeping it private
|
||||
root {{{dirname}}}/;
|
||||
}
|
||||
# /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 {{{dirname}}}/{{{nginx.fswww}}}/plugins/;
|
||||
if (-f {{{dirname}}}/{{{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";
|
||||
}
|
||||
|
||||
location /cdn/ {
|
||||
rewrite /cdn/(.*$) /$1 break;
|
||||
root {{{dirname}}}/{{{nginx.fswww}}}www/cdn/;
|
||||
}
|
||||
|
||||
location /spacedev/ {
|
||||
rewrite /spacedev/(.*$) /$1 break;
|
||||
root {{{dirname}}}/{{{nginx.fswww}}}spacedev/{{{nginx.website}}}/dist/;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
rewrite /api/(.*$) /$1 break;
|
||||
proxy_pass http://localhost:{{{api.port}}};
|
||||
proxy_redirect off;
|
||||
include proxy_params;
|
||||
}
|
||||
|
||||
location / {
|
||||
root {{{dirname}}}/{{{nginx.fswww}}}www/{{{nginx.website}}};
|
||||
index index.html {{{nginx.pageindex}}};
|
||||
}
|
||||
error_page 404 /404.html;
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/local/nginx/html;
|
||||
}
|
||||
}
|
34
nationschainssave/www/adminapx/nginx/nginx.conf.mustache
Executable file
34
nationschainssave/www/adminapx/nginx/nginx.conf.mustache
Executable file
@@ -0,0 +1,34 @@
|
||||
user {{{sudoerUser}}};
|
||||
worker_processes auto;
|
||||
error_log {{{ }}}/var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
#include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '[$time_local]##"$http_x_forwarded_for"##"$request" '
|
||||
'"$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;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
gzip on;
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
{{#nginx.include}}
|
||||
include {{{.}}};
|
||||
{{/nginx.include}}
|
||||
}
|
11
nationschainssave/www/adminapx/nginx/proxy_params.mustache
Normal file
11
nationschainssave/www/adminapx/nginx/proxy_params.mustache
Normal file
@@ -0,0 +1,11 @@
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
client_max_body_size 10m;
|
||||
client_body_buffer_size 128k;
|
||||
proxy_connect_timeout 90;
|
||||
proxy_send_timeout 90;
|
||||
proxy_read_timeout 90;
|
||||
proxy_buffers 32 4k;
|
||||
proxy_set_header X-NginX-Proxy true;
|
Reference in New Issue
Block a user