2023-08-24 09:47:45 +00:00
|
|
|
log_format apm '"$time_local" client=$remote_addr '
|
|
|
|
'method=$request_method request="$request" '
|
|
|
|
'request_length=$request_length '
|
|
|
|
'status=$status bytes_sent=$bytes_sent '
|
|
|
|
'body_bytes_sent=$body_bytes_sent '
|
|
|
|
'referer=$http_referer '
|
|
|
|
'user_agent="$http_user_agent" '
|
|
|
|
'upstream_addr=$upstream_addr '
|
|
|
|
'upstream_status=$upstream_status '
|
|
|
|
'request_time=$request_time '
|
|
|
|
'upstream_response_time=$upstream_response_time '
|
|
|
|
'upstream_connect_time=$upstream_connect_time '
|
|
|
|
'upstream_header_time=$upstream_header_time';
|
|
|
|
|
2022-08-10 04:46:01 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name _;
|
|
|
|
root /app/nocobase/packages/app/client/dist;
|
|
|
|
index index.html;
|
|
|
|
client_max_body_size 20M;
|
|
|
|
|
2023-08-24 09:47:45 +00:00
|
|
|
access_log /var/log/nginx/nocobase.log apm;
|
|
|
|
|
2022-08-10 04:46:01 +00:00
|
|
|
location /storage/uploads/ {
|
|
|
|
alias /app/nocobase/storage/uploads/;
|
|
|
|
autoindex off;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
root /app/nocobase/packages/app/client/dist;
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /api/ {
|
|
|
|
proxy_pass http://127.0.0.1:13000/api/;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection 'upgrade';
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
}
|
|
|
|
}
|