【发布时间】:2014-10-24 14:43:35
【问题描述】:
此question 与我的问题有关。
实际上我在 Ubuntu 14.04 LTS 64bits 上使用 Apacha 版本: 服务器版本:Apache/2.4.7 (Ubuntu) 服务器搭建:2014年7月22日14:36:38
当我键入命令 mod_wsgi-express start-server 以检查它是否运行时。它似乎没有运行,我有一个错误:
root@website:/home/website# mod_wsgi-express start-server
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:0
Server Conf : /tmp/mod_wsgi-localhost:8000:0/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:0/error_log
AH00526: Syntax error on line 16 of /tmp/mod_wsgi-localhost:8000:0/httpd.conf:
Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n
我在安装到doom 时遇到了同样的问题。欢迎任何建议!
更多信息:
Apache 中使用的模块:
Compiled in modules:
core.c
mod_so.c
mod_watchdog.c
http_core.c
mod_log_config.c
mod_logio.c
mod_version.c
mod_unixd.c
Python 版本:
>>> print (sys.version)
2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2]
【问题讨论】:
-
错误似乎很明显:不要以 root 身份运行。你为什么要这样做?您永远不应该真正以 root 身份登录。
-
是的,我稍后会注意!谢谢!
标签: python django apache2 mod-wsgi ubuntu-14.04