Invoice Ninja allows attaching documents to invoices, payments, expenses, etc. Tabitha wants to use this feature to attach receipts for her expenses, but the photos her phone takes of them are too large for the default nginx client body limit. We can raise this limit on the ingress, but we also need to raise it on the "inner" nginx.
71 lines
1.5 KiB
Nginx Configuration File
71 lines
1.5 KiB
Nginx Configuration File
worker_processes auto;
|
|
|
|
error_log /var/log/nginx/error.log notice;
|
|
|
|
pid /run/nginx/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
access_log /var/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
|
|
gzip on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
upstream backend {
|
|
server 127.0.0.1:9000;
|
|
}
|
|
|
|
server {
|
|
listen 8000 default;
|
|
server_name _;
|
|
|
|
root /var/www/app/public;
|
|
|
|
index index.php;
|
|
|
|
charset utf-8;
|
|
|
|
client_max_body_size 0;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location /health {
|
|
return 200 'UP';
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass backend;
|
|
fastcgi_index index.php;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_intercept_errors on;
|
|
fastcgi_buffer_size 16k;
|
|
fastcgi_buffers 4 16k;
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|
|
}
|