为Apache 2.4安装mod_wsgi模块

时间:2016-05-09 06:26:40

标签: python-2.7 mod-wsgi apache2.4

我有一个Python Flask-restful应用程序。我想通过Apache服务器而不是开发服务器来提供它。

我在<VirtualHost *:80> ServerName batch-autoscaling-algos WSGIDaemonProcess optimzation_app user=mv2 group=mv2 threads=1 WSGIScriptAlias / /projects/mv2/millvi-auto-scaling/batch-auto-scaling/api/htdocs/optimization.wsgi <Directory /projects/mv2/millvi-auto-scaling/batch-auto-scaling/api/htdocs/optimization_app> WSGIProcessGroup optimization_app WSGIApplicationGroup %{GLOBAL} Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> 文件中有以下内容:

mod_wsgi

以前,我安装了PHP 5.6和Apache 2.2。因此,我只是通过yum search mod-wsgi安装了yum install,然后根据相应的Python版本执行了yum search mod-wsgi,因此效果很好。

现在,我重新安装了PHP5.6,它自动由Apache升级到版本2.4。

此时我No matches foundInvalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration。如果我尝试使用上述配置简单地重启apache,则会显示mod_wsgi

安装var quizDiv = document.createElement("div") //gives from element and id attribute quizDiv.setAttribute("id", "airspeedIndicatorQuiz") //retreives element on page inwhitch to place form and saves it in variable var makeNewPage = document.getElementById("newPage") //appentds input form to makeNewPage makeNewPage.appendChild(quizDiv) //creat sub element and store in variable vso var vso = document.createElement("sub") //creat text node and store in variable vsoText var vsoText = document.createTextNode("SO") //append vsoText to vso vso.appendChild(vsoText) console.log(vso) var aIMakingsObj = [{ marking: "White arc", meaning: "Flap oparating range" }, { marking: "V" + vso.innerHTML + " Lower A/S Limit White Arc", meaning: "Stall speed landing configuration" }, { marking: "V<sub>FE</sub> Upper A/S Limit White Arc", meaning: "Maximum flap extention speed" }, { marking: "Green Arc", meaning: "Normal Oparating Range" }, { marking: "V" + '<sub>S1</sub>' + " Lower A/S Limit Green Arc", meaning: "Maximum flap extention speed" }, { marking: "V<sub>NO</sub> Upper A/S Limit Green Arc", meaning: "Maximum structural cruse speed" }, { marking: "Yellow Arc", meaning: "Caution Range (oparations in smooth air only)" }, { marking: "V" + '<sub>NE</sub>' + " Red Line", meaning: "never exceed speed; above this speed structural failure may occure" }] displayQuiz() function displayQuiz() { for (i = 0; i < aIMakingsObj.length; i++) { var aPool = document.createElement("p"); aPool.innerHTML = aIMakingsObj[i].marking; // modified makeNewPage.appendChild(aPool) } }的正确方法是什么。我使用的是亚马逊Linux和Python 2.7版。

0 个答案:

没有答案