nginx的default原文件
时间: 2023-12-10 08:50:05 浏览: 66
以下是nginx默认配置文件:
```
# This is the main configuration file for the web server.
# Set the user and group that the server should run as.
user nginx;
worker_processes auto;
# Set the error log file and log level.
error_log /var/log/nginx/error.log warn;
# Set the pid file.
pid /var/run/nginx.pid;
# Load the configuration files for modules installed on the server.
include /etc/nginx/modules/*.conf;
# Set the worker connections limit.
events {
worker_connections 1024;
}
# Configure the HTTP server.
http {
# Set the server name.
server_name localhost;
# Set the access log file and log format.
access_log /var/log/nginx/access.log main;
# Set the default MIME type.
default_type application/octet-stream;
# Set the client body buffer size.
client_body_buffer_size 10K;
# Set the client header buffer size.
client_header_buffer_size 1k;
# Set the maximum size of the client request body.
client_max_body_size 8m;
# Set the sendfile directive to on.
sendfile on;
# Set the TCP_NODELAY option on.
tcp_nopush on;
# Set the keepalive timeout.
keepalive_timeout 65;
# Set the gzip compression.
gzip on;
gzip_disable "msie6";
# Include the virtual hosts configurations.
include /etc/nginx/conf.d/*.conf;
}
```
阅读全文