apxtrib/nationchains/www/nginx_setup.conf

53 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-01-22 09:53:09 +00:00
server {
2023-04-17 10:03:56 +00:00
server_name adminapx ;
access_log /media/phil/usbfarm/apxtrib/nationchains/logs/nginx/setup.town.access.log main;
2023-01-22 09:53:09 +00:00
# /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";
2023-04-17 10:03:56 +00:00
root /media/phil/usbfarm/apxtrib/nationchains//plugins/;
if (-f /media/phil/usbfarm/apxtrib/nationchains//plugins/$arg_plugin/keys/$arg_pluginkey) {
2023-01-22 09:53:09 +00:00
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;
2023-04-17 10:03:56 +00:00
root /media/phil/usbfarm/apxtrib/nationchains//www/cdn/;
2023-01-22 09:53:09 +00:00
}
location /spacedev/ {
rewrite /spacedev/(.*$) /$1 break;
2023-04-17 10:03:56 +00:00
root /media/phil/usbfarm/apxtrib/nationchains//spacedev//dist/;
2023-01-22 09:53:09 +00:00
}
location /app/ {
rewrite /app/(.*$) /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
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;
2023-04-17 10:03:56 +00:00
proxy_pass http://localhost:3018;
2023-01-22 09:53:09 +00:00
proxy_redirect off;
}
location / {
2023-04-17 10:03:56 +00:00
root /media/phil/usbfarm/apxtrib/nationchains//www/app/;
index index.html ;
2023-01-22 09:53:09 +00:00
}
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;
}
}