推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
zzlettle
V2EX  ›  Python

django 网站显示中文名图片为 404,也可能是 nginx 的问题。求解

  •  
  •   zzlettle · Oct 12, 2017 · 3716 views
    This topic created in 3272 days ago, the information mentioned may be changed or developed.
    个人网站,有人上传头像的图片是中文名。感觉以前同样的设置,图片都正常现实,最近换了个服务器,里面的设置也同样,无意中发现有些人的头衔图片无法显示,点开图片页面是 404.
    不知道问题出在哪里,我也按照网站的教程,可能是 nginx 的问题,先检查系统 locale 命令,显示是 utf-8

    然后把这个 server 的 nginx 的字符参数修改为 utf-8
    charset utf-8;
    依然没有解决问题。
    不知道问题出在哪里。知道的朋友告诉下。谢谢
    5 replies  •  2017-10-12 20:37:35 +08:00
    virusdefender
        1
    virusdefender  
       Oct 12, 2017
    看 nginx 的 error log
    scriptB0y
        2
    scriptB0y  
       Oct 12, 2017
    collectstatic ?
    prasanta
        3
    prasanta  
       Oct 12, 2017
    图片名称不要使用用户的,重新取一个
    zzlettle
        4
    zzlettle  
    OP
       Oct 12, 2017 via iPad
    @prasanta 问题是以前是可以正常显示的。
    @scriptB0y 感觉这个不是问题所在。
    @virusdefender error 不就是没有找到这个中文的文件么
    abmin521
        5
    abmin521  
       Oct 12, 2017
    文件名太长 试试 --with-debug 看详细日志?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   974 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 23:02 · PVG 07:02 · LAX 16:02 · JFK 19:02
    ♥ Do have faith in what you're doing.