当前位置: 首页 > news >正文

顺天亿建设网站/外链工厂

顺天亿建设网站,外链工厂,专注合肥网站推广,网站开发的关键技术1.如何在一台阿里云服务器下 搭建多个网站? 2.Uncaught TypeError: $.fn.placeholder is not a function Paste_Image.png 注释掉报错位置之后的jquery script后,报错就没了,不知道为什么。 Paste_Image.png 3.Failed to load resource: the …

1.如何在一台阿里云服务器下 搭建多个网站?

2.Uncaught TypeError: $.fn.placeholder is not a function

10011854_rEfx.png
Paste_Image.png

注释掉报错位置之后的jquery script后,报错就没了,不知道为什么。

10011854_kvvg.png
Paste_Image.png

3.Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8000/favicon.ico

10011854_DzwM.png
Paste_Image.png


后台也有报错信息,

[30/Apr/2017 07:02:12] "GET /favicon.ico HTTP/1.1" 404 3976
Not Found: /favicon.ico

解决方法:
在根urls.py中添加,

from django.views.generic import RedirectView
urlpatterns = [...# Added at 20170430url(r'^^favicon\.ico$', RedirectView.as_view(url='static/site/v1/img/Kfavicon.ico'),name='go-to-favicon'),]

其中,可以在网上生成ico图标,例如 http://www.faviconico.org/

10011855_BvVN.png
Paste_Image.png

下面的code有无必要不确定,总之没加,也可以显示。

 <!--Added at 20170430--><link REL="SHORTCUT ICON" HREF="{{ STATIC_URL }}site/v1/img/Kfavicon.ico">

4.The _imagingft C module is not installed

使用captcha生成验证码,部署到阿里云上后,验证码总是不显示,浏览器报错。度娘之后,网上说是因为缺少一个freetype的库,或者没有安装对应的图片和处理字体的包。解决办法就是先卸载PIL的包,然后安装需要的库,接着重装PIL。

10011855_7LK4.png
Paste_Image.png
10011856_xax4.png
Paste_Image.png
10011856_lGpT.png
Paste_Image.png
10011857_mH5D.png
Paste_Image.png

首先,如何卸载已安装的库?执行sudo pip freeze可以查询所有已安装的库;接着用sudo apt-get uninstall Pillow 去删除已经安装的库,进入安装路径下看,确实已经移除;然后,安装相应的库及PIL。

sudo apt-get install libjpeg-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install PIL
xxx@iZ25e4mkhq2Z:~$ sudo pip freeze
[sudo] password for xxx: 
Django==1.9.9
MySQL-python==1.2.5
Pillow==2.2.1
apt-xapian-index==0.45
argparse==1.2.1
chardet==2.0.1
colorama==0.2.5
django-ckeditor==5.1.1
django-crispy-forms==1.6.0
django-formtools==1.0
django-redis==4.4.4
django-reversion==2.0.6
django-simple-captcha==0.5.3
django-widget-tweaks==1.4.1
html5lib==0.999
httplib2==0.9.2
pbr==1.10.0
python-apt==0.9.3.5ubuntu1
python-debian==0.1.21-nmu2ubuntu2
qrcode==5.3
redis==2.10.5
requests==2.2.1
six==1.10.0
ssh-import-id==3.21
stevedore==1.17.1
uWSGI==2.0.13.1
urllib3==1.7.1
virtualenv==1.11.4
virtualenv-clone==0.2.6
virtualenvwrapper==4.7.2
wsgiref==0.1.2
xadmin==0.6.1
xxx@iZ25e4mkhq2Z:~$ sudo pip uninstall Pillow
Uninstalling Pillow:/usr/local/lib/python2.7/dist-packages/Pillow-2.2.1-py2.7-linux-x86_64.egg
Proceed (y/n)? ySuccessfully uninstalled Pillow

打开nginx和uwsgi的log,可以发现同样的报错:

/var/log/uwsgi/xxx.log:Internal Server Error: /captcha/image/f822586d0b069cc9caa7f97e0093fbda20f26f8a/
Traceback (most recent call last):File "/usr/local/lib/python2.7/dist-packages/Django-1.9.9-py2.7.egg/django/core/handlers/base.py", line 149, in get_responseresponse = self.process_exception_by_middleware(e, request)File "/usr/local/lib/python2.7/dist-packages/Django-1.9.9-py2.7.egg/django/core/handlers/base.py", line 147, in get_responseresponse = wrapped_callback(request, *callback_args, **callback_kwargs)File "/usr/local/lib/python2.7/dist-packages/django_simple_captcha-0.5.3-py2.7.egg/captcha/views.py", line 67, in captcha_imagefont = ImageFont.truetype(fontpath, settings.CAPTCHA_FONT_SIZE * scale)File "build/bdist.linux-x86_64/egg/PIL/ImageFont.py", line 242, in truetypereturn FreeTypeFont(font, size, index, encoding)File "build/bdist.linux-x86_64/egg/PIL/ImageFont.py", line 146, in __init__self.font = core.getfont(font, size, index, encoding)File "build/bdist.linux-x86_64/egg/PIL/ImageFont.py", line 42, in __getattr__raise ImportError("The _imagingft C module is not installed")
ImportError: The _imagingft C module is not installed
/var/log/nginx/error.log:
2017/05/01 14:09:24 [error] 13170#0: *24766 upstream prematurely closed connection while reading response header from upstream, client: 123.113.102.173, server: 123.57.231.214, request: "GET /captcha/image/f822586d0b069cc9caa7f97e0093fbda20f26f8a/ HTTP/1.1", upstream: "uwsgi://unix:///home/kai/workspace/TheBoat/TheBoat.sock:", host: "123.57.231.214", referrer: "http://123.57.231.214/blog/8/"

重新启动了uwsgi和nginx,页面加载正常。

xxx@iZ25e4mkhq2Z:~/yyy/zzz/uwsgi$ sudo uwsgi --ini TheBoat_uwsgi.ini
xxx@iZ25e4mkhq2Z:~/yyy/zzz/uwsgi$ ps -eaf|grep uwsgi
root      2578     1  5 13:08 ?        00:00:00 uwsgi --ini TheBoat_uwsgi.ini
root      2581  2578  0 13:08 ?        00:00:00 uwsgi --ini TheBoat_uwsgi.ini
root      2582  2578  0 13:08 ?        00:00:00 uwsgi --ini TheBoat_uwsgi.ini
root      2583  2578  0 13:08 ?        00:00:00 uwsgi --ini TheBoat_uwsgi.ini
root      2584  2578  0 13:08 ?        00:00:00 uwsgi --ini TheBoat_uwsgi.ini
xxx       2586  2533  0 13:08 pts/0    00:00:00 grep --color=auto uwsgi
10011857_ZrMx.png
Paste_Image.png

5. Illegal mix of collations

10011858_iFFQ.png
Paste_Image.png
10011858_4NCk.png
Paste_Image.png

转载于:https://my.oschina.net/u/3579120/blog/1533308

http://www.lbrq.cn/news/739333.html

相关文章:

  • 北京网站建设的服务公司/seo网站怎么搭建
  • 网站建设中怎么解决/看广告赚钱一天50元
  • 政府网站集约化建设的好处/怎么做百度网页推广
  • 建个站的免费网站能上百度吗/销售的三个核心点
  • 漳州市政府门户网站建设/百度下载并安装到桌面
  • web版wordpress/seo公司排行
  • 免费空间申请2018/官网seo优化
  • wordpress源码系统下载地址/南京百度网站快速优化
  • 新手卖家做来赞达网站如何/引流推广平台
  • flash做的小动画视频网站/怎么做手工
  • php不用框架怎么做网站/制作网站要多少费用
  • 东莞网站建设有什么网络公司/厦门百度推广排名优化
  • 公司网站制作内容/制作一个网站的费用是多少
  • 深圳国税局网站怎么做票种核定/大庆建站公司
  • 企业官网门户网站管理系统/保定百度seo公司
  • 设计类专业介绍/seo推广优化培训
  • 蒙阴建设局网站/网络推广引流有哪些渠道
  • 上海门户网站制/合肥seo整站优化
  • 不懂英文怎么做英文的seo网站/鄞州seo服务
  • 电脑网页打不开怎么解决/关键词快速优化排名软件
  • dw做旅游网站毕业设计模板下载/网站快速建站
  • 怎么看网站开发语言/免费python在线网站
  • 加强县政府网站建设的几点建议/软件排名优化
  • 淘宝店招免费做的网站有/网站做优化好还是推广好
  • 网页的响应式布局/免费关键词优化工具
  • 网站宽屏背景/seo网络营销外包
  • 制作图片的软件叫什么/徐州seo招聘
  • 广州外贸网站设计/传媒网站
  • 央企 网站建设 公司/推广网络营销外包公司
  • 有什么做服装的网站/暴风seo论坛
  • 深入理解与应用向量嵌入(Vector Embeddings):原理、实现与多场景实践
  • Obsidian 1.9.10升级
  • python-使用鼠标对图片进行涂抹自定义绘图
  • k8sday12数据存储(1/2)
  • 算法提升树形数据结构-(线段树)
  • 有关SWD 仿真和PA.15, PB3, PB4的冲突问题