@Tyhj
2018-12-02T07:52:28.000000Z
字数 492
阅读 1168
linux
sudo yum install nginxsudo systemctl start nginx.servicesudo systemctl enable nginx.servicefirewall-cmd --zone=public --add-port=80/tcp --permanentfirewall-cmd --reloadvim /etc/nginx/conf.d/file_server.confvim /etc/nginx/nginx.conf
server {listen 80;server_name lc-fgtnb2h8.yorhp.com; # 自己PC的ip或者服务器的域名 charset utf-8; # 避免中文乱码root /home/fileManager/; # 存放文件的目录location / {autoindex off; # 索引autoindex_exact_size on; # 显示文件大小autoindex_localtime on;}error_page 404 403 500 502 503 504 = https://github.com/404.html;}
