配置文件
worker_processes 4;
error_log logs/error.log warn;
pid logs/nginx.pid;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 30;
gzip on;
gzip_types text/javascript text/plain text/css application/xml application/x-javascript;
server {
listen 80;
server_name localhost;
charset utf-8;
location / {
root /www/;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
autoindex_format html;
}
}
}
reference
https://blog.csdn.net/zht666/article/details/16888559
https://blog.csdn.net/lihuapiao/article/details/53560912
网友评论