OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
92
nginx-subfolder.example.conf
Normal file
92
nginx-subfolder.example.conf
Normal file
@@ -0,0 +1,92 @@
|
||||
server {
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name domain.example.com;
|
||||
return 301 https://domain.example.com$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name domain.example.com;
|
||||
set $base /var/www/leantime;
|
||||
root $base/public;
|
||||
|
||||
ssl_certificate /etc/ssl/domain.example.com/ssl-bundle.crt;
|
||||
ssl_certificate_key /etc/ssl/domain.example.com/domain.example.com.key;
|
||||
|
||||
# logging
|
||||
access_log /var/log/nginx/leantime.access.log;
|
||||
error_log /var/log/nginx/leantime.error.log warn;
|
||||
|
||||
# index.php
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~.php$ {
|
||||
# 404
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
# default fastcgi_params
|
||||
include fastcgi_params;
|
||||
|
||||
# fastcgi settings
|
||||
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_buffers 8 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
|
||||
# fastcgi params
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
|
||||
}
|
||||
|
||||
# SECOND location rewrite instructions
|
||||
location /leantime {
|
||||
alias PATHTOLEANTIME/public;
|
||||
|
||||
try_files $uri $uri/ @leantime;
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
|
||||
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
|
||||
}
|
||||
}
|
||||
|
||||
location @leantime {
|
||||
rewrite /leantime/(.*)$ /leantime/index.php?/$1 last;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# robots.txt
|
||||
location = /robots.txt {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
|
||||
location ^~ /dist/ {
|
||||
expires 7d;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# gzip
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/javascript;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
}
|
||||
Reference in New Issue
Block a user