编辑nginx配置文件
server {
listen 80;
server_name file.chuckpu.com;
#设置字符编码,解决浏览器访问乱码问题
charset utf-8,gbk;
location /{
#指定目录
root /home/wwwroot/file.chiq-cloud.com;
index index.php index.html index.htm;
#开启目录浏览功能
autoindex on;
#显示出文件的大概大小,单位是kB或者MB或者GB
autoindex_exact_size off;
#显示的文件时间为文件的服务器时间
autoindex_localtime on;
}
access_log /home/wwwlogs/file.chiq-cloud.com.log access;
}
nginx -t 检查配置文件是否正确
nginx -s reload 重新加载配置文件