安装nginx
sudo apt install nginx
配置nginx
配置文件位置:
/etc/nginx/nginx.conf
user root; ## 使用root访问,省事,不然有权限问题
server {
listen 8000; ## 访问端口
server_name 192.169.x.x; ## 服务器ip
charset utf-8,gbk; ## 编码
root /home/liujiang/mirrors/tizen; ## 服务器访问时的root路径
location / {
autoindex on; ## 列出目录
autoindex_exact_size off; ## 显示大小
autoindex_localtime on; ## 显示时间戳
}
access_log /home/xxxx/nginx/pip.log; ## 访问log 路径
}
log文件位置
/var/log/nginx/