This commit is contained in:
parent
8ad2f46cc3
commit
a24fe5843f
@ -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; # 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
|
||||||
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
keepalive_timeout 15;
|
|
||||||
types_hash_max_size 4096;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
server_name _;
|
server_name _; # Listen on all hostnames
|
||||||
listen 80;
|
listen 80; # Listen on port 80
|
||||||
|
|
||||||
root /var/www/html;
|
root /var/www/html; # Serve files from /var/www/html
|
||||||
index index.html index.htm;
|
index index.html index.htm; # Serve index.html and index.htm by default
|
||||||
|
|
||||||
# TCP optimizations
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
|
|
||||||
# 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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user