开发者社区> 问答> 正文

用root用户启动nginx搭建的图片服务器,无权限访问,求助

如题,主机有2个用户,root和自己创建的bhkj用户。用自己创建的bhkj用户启动nginx可以访问到图片,但是用root启动就提示

403 Forbidden


You don't have permission to access the URL on this server. Sorry for the inconvenience. Please report this message and include the following information to us. Thank you very much!


nginx配置如下:

    server {
        listen       8000;
        server_name  localhost;
        location ~ .*\.(gif|jpg|jpeg|png) {
            root   /app/bhkj/wls12130/user_projects/domains/BABY/servers/myserver/;
        }
    }
访问地址为:http://xxx.xx.xx.xx:8000/upload/1413951178960photo.jpg


求指点如何用root启动nginx还能访问到图片!

展开
收起
yuanjf 2014-11-02 22:00:21 9150 0
2 条回答
写回答
取消 提交回答
  •   
    2014-11-04 19:55:46
    赞同 展开评论 打赏
  • 推荐楼主用面板管理服务器吧
    2014-11-03 09:10:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载