refactor docker swarm to use just home without workers for now
add caching at nginx level for portainer and gitea
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
proxy_cache_path /data/nginx/cache/nextcloud levels=1:2 keys_zone=my_cache:10m max_size=10g
|
||||
inactive=60m use_temp_path=off;
|
||||
|
||||
|
||||
upstream xaibox_upstream {
|
||||
server tasks.xaibox_app:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
index index.php index.html;
|
||||
server_name docker.test;
|
||||
server_name xaibox.xai-corp.net;
|
||||
|
||||
client_max_body_size 256m;
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
location /remote.php {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass tasks.xaicloud:9000;
|
||||
fastcgi_pass xaibox_upstream;
|
||||
fastcgi_index remote.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
@@ -18,18 +25,51 @@ server {
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php?$args;
|
||||
}
|
||||
|
||||
# location / {
|
||||
location ~ \.php$ {
|
||||
location /public.php {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass tasks.xaicloud:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass xaibox_upstream;
|
||||
fastcgi_index public.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
# fastcgi_param SCRIPT_FILENAME $document_root/index.php;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location / {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass xaibox_upstream;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location /index.php {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass xaibox_upstream;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
return 404;
|
||||
}
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
|
||||
fastcgi_pass xaibox_upstream;
|
||||
#fastcgi_index public.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
#fastcgi_param SCRIPT_FILENAME $document_root/index.php;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
#location / {
|
||||
# try_files $uri $uri/;
|
||||
#}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user