ITeye博客

nginx 简单配置

stephen80 · 2013-10-29 15:49 · linux · Web前端 · Markdown

如何用nginx 发表一个文件 ?

1.修改nginx.conf 增加:

66 server { 67 listen 80; 68 server_name iece.jd.com; 69 70 location / { 71 root /home/ece/htdocs/ftp.ece; 72 index index.html index.htm; 73 } 74 }

2.检查配置 sudo ./nginx -t -c conf/nginx.conf

3.reload

./nginx -s reload

4.试验 wget iece.jd.com

  1. 解决权限问题 403 forbidden

nginx/logs/error.log failed (13: Permission denied

修改配置 nginx.conf : user root;

(namei -l /home/ece/htdocs/ftp.ece/index.html )

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。