vi /usr/local/nginx/conf/nginx.conf #编辑配置文件,在server {下面添加以下内容:
location /
{
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
重启nginx服务器
1)pkill -HUP nginx
2)kill -HUP `pgrep -uroot nginx` Pgrep -uroot nginx
3)/usr/local/nginx/sbin/nginx -s reload