zoukankan      html  css  js  c++  java
  • Django+nginx+uwsgi静态文件permission denied!

    把项目部署到服务器上之后,没有样式,静态文件没有找到。

    通过查看nginx的错误日志,发现nginx请求的静态文件提示“permission denied”

    意识就是没有权限,查找资料,发现修改nginx.conf的配置可以解决问题。

    (env) [root@ nginx]# cat nginx.conf

    user root; 默认是nginx,改成root就可以了。
    worker_processes 1;

    error_log /var/log/nginx/error.log warn;
    pid /var/run/nginx.pid;


    events {
    worker_connections 1024;
    }


    http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

    access_log /var/log/nginx/access.log main;

    sendfile on;
    #tcp_nopush on;

    keepalive_timeout 65;

    #gzip on;

    include /etc/nginx/conf.d/*.conf;
    }

  • 相关阅读:
    类加载,初始化
    jvm classLoader architecture
    只选择年份的下拉菜单
    spring框架学习(二)依赖注入
    spring框架学习(一)
    JSP 过滤器
    JSP9个内置对象
    JSP 动作元素
    众数
    基于excel9.h的excel处理
  • 原文地址:https://www.cnblogs.com/qinghuaL/p/9578539.html
Copyright © 2011-2022 走看看