开发者

Pylons uploads url 404 on nginx

开发者 https://www.devze.com 2023-03-18 04:46 出处:网络
I have deployed my pylons app on the server~ I use nginx end flup, here are the confs cat vps.ini [server:main]

I have deployed my pylons app on the server~

I use nginx end flup, here are the confs

cat vps.ini

[server:main]

 use = egg.Flup#fcgi_thread
 host = 0.0.0.0
 port = 5000
 [app:main]
 ...
 permanent_store = %(here)s/data/uploads

cat /etc/nginx/site-enabled/pylons

server{ listen 80;
   include fastcgi_params;
   fastcgi_index index;
   fastcgi_pass 127.0.0.1:5000;
}

cat Cksite/cksite/config/routing.py

map.connect('upload/*url')

link

cd Cksite/cksite/public/ 
ln -s ../../data/uploads .uploads

but when I u开发者_C百科pload a image to the server and visit the url I got a 404 Not Found page.

http://znetor.tk/uploads/22494C1F3AA5FBCDC07F28FF821DC6C1.jpg

all things works well on my laptop with paster server development.ini~


I think the best way for this is will be to put your upload directory directly on the public folder of your project

This way you won't get into folder permission issues, it's way better than symlinking in my own opinion

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号