此question与我的问题有关。
实际上我使用Apacha版本而不是Ubuntu 14.04 LTS 64bits: 服务器版本: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]
答案 0 :(得分:0)
我有一个类似的问题试图启动TurboGears python应用程序。我终于能够通过执行包含用户选项的start-server命令来启动它。我将用户选项设置为等于运行apache的用户。在我的情况下,用户是“apache”。见下文。
[root@localhost ~]# mod_wsgi-express start-server --user=apache <path_to_my_wsgi_file>