Django 配置Apache出现错误?
在配置好Apche时候重启报错:
错误码
root@iZ28n0rfnpyZ:/etc/apache2/sites-available# /etc/init.d/apache2 restart
Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.163.115.52. Set the 'ServerName' directive globally to suppress this message
[ OK ]
root@iZ28n0rfnpyZ:/etc/apache2/sites-available# tail /var/log/apache2/error.log
[Tue Mar 22 16:40:39.420386 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 198, in import_models
[Tue Mar 22 16:40:39.420461 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] self.models_module = import_module(models_module_name)
[Tue Mar 22 16:40:39.420474 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Tue Mar 22 16:40:39.420521 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] __import__(name)
[Tue Mar 22 16:40:39.420533 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] File "/home/blog/home/models.py", line 8, in <module>
[Tue Mar 22 16:40:39.420616 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] from mptt.fields import TreeForeignKey
[Tue Mar 22 16:40:39.420638 2016] [:error] [pid 13251:tid 140413953038080] [client 139.227.149.246:49625] ImportError: No module named mptt.fields
[Tue Mar 22 16:43:42.124421 2016] [mpm_event:notice] [pid 13248:tid 140414048438144] AH00491: caught SIGTERM, shutting down
[Tue Mar 22 16:43:43.131020 2016] [mpm_event:notice] [pid 13388:tid 140027491424128] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Mar 22 16:43:43.131135 2016] [core:notice] [pid 13388:tid 140027491424128] AH00094: Command line: '/usr/sbin/apache2'
root@iZ28n0rfnpyZ:/etc/apache2/sites-available#
服务器配置
ubuntun11.4+mysql+apache
我是看这篇文章在配置
http://www.ziqiangxuetang.com/django/django-deploy.html
当时域名还没有的时候用IP是正常的
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确认 mptt 已安装且在搜索路径中