Many improvements to the server #4

Merged
Fascinated merged 13 commits from development into master 2023-07-07 23:07:20 +00:00
Showing only changes of commit a24fe5843f - Show all commits

@ -3,35 +3,34 @@ events {
}
http {
access_log /dev/stdout;
error_log /dev/stdout;
access_log /dev/stdout; # Log access to stdout
error_log /dev/stdout; # Log errors to stdout
# Log format
log_format main '[$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
'"$http_user_agent" "$http_x_forwarded_for"';
include mime.types;
default_type application/octet-stream;
include mime.types; # Include the mime types file
default_type application/octet-stream; # Default type
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 4096;
sendfile on; # Send files directly from disk
keepalive_timeout 15; # Keep connections alive for 15 seconds
types_hash_max_size 4096; # Max number of mime types
# TCP optimizations
tcp_nopush on; # Send headers in one packet
tcp_nodelay on; # Don't wait for packets to be full
server {
server_name _;
listen 80;
server_name _; # Listen on all hostnames
listen 80; # Listen on port 80
root /var/www/html;
index index.html index.htm;
# TCP optimizations
tcp_nopush on;
tcp_nodelay on;
root /var/www/html; # Serve files from /var/www/html
index index.html index.htm; # Serve index.html and index.htm by default
# Gzip
sendfile on;
gzip on;
gzip_disable "msie6";
gzip_vary on;
@ -42,6 +41,7 @@ http {
client_max_body_size 500M; # Will get replaced by the environment variable MAX_UPLOAD_SIZE
# Upload endpoint
location /upload.php {
try_files $uri =404;
@ -53,7 +53,8 @@ http {
include fastcgi_params;
}
location / {
# Serve your files
location / {
expires 7d;
open_file_cache max=1000 inactive=60s;