sharex-php-uploader/docker/nginx.conf

59 lines
1.3 KiB
Nginx Configuration File
Raw Normal View History

2023-07-04 15:39:08 +00:00
events {
worker_connections 4096;
}
http {
2023-07-04 15:46:10 +00:00
access_log /dev/stdout;
2023-07-04 15:56:47 +00:00
error_log /dev/stdout;
2023-07-04 15:46:10 +00:00
2023-07-04 15:37:53 +00:00
server {
server_name _;
listen 80;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 8;
gzip_buffers 16 64k;
2023-07-04 15:46:10 +00:00
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
2023-07-04 15:37:53 +00:00
root /var/www/html;
index index.html index.htm;
client_max_body_size 500M;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
2023-07-04 16:02:32 +00:00
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
2023-07-04 15:37:53 +00:00
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
location / {
expires 7d;
2023-07-04 16:14:31 +00:00
# TCP optimizations
tcp_nopush on;
tcp_nodelay on;
# file shit
sendfile on;
# Keep connections alive for 15 seconds
keepalive_timeout 15;
2023-07-04 15:37:53 +00:00
open_file_cache max=1000 inactive=60s;
open_file_cache_valid 60s;
open_file_cache_min_uses 1;
open_file_cache_errors on;
# Serve the file directly from disk
try_files $uri $uri/;
}
2023-07-04 15:32:18 +00:00
}
2023-07-04 15:37:53 +00:00
}