sharex-php-uploader/docker/nginx.conf
Fascinated 084b8b9a82
Some checks failed
/ docker (ubuntu-latest, 2.38.4) (push) Has been cancelled
add dockerhub image
2023-07-04 17:56:28 +01:00

45 lines
962 B
Nginx Configuration File

events {
worker_connections 4096;
}
http {
access_log /dev/stdout;
error_log /dev/stdout;
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 4096;
server {
server_name _;
listen 80;
root /var/www/html;
index index.html index.htm;
client_max_body_size 500M; # Will get replaced by the environment variable MAX_UPLOAD_SIZE
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
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;
# Serve the file directly from disk
try_files $uri $uri/;
}
}
}