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