我在Windows上,并试图调用Apache服务器上的mod_wsgi。 我在/usr/lib/apache2/modules/find了mod_wsgi.so,我有一个名为MyApp的目录 – /home/danu_bg/public_html/MyApp 。
def application(environ,start_response): status = '200 OK' output = 'Hello World!' response_headers = [('Content-type','text/plain'),('Content-Length',str(len(output)))] start_response(status,response_headers) return [output]
<Directory /home/danu_bg/public_html/MyApp> WsgiScriptAlias /home/danu_bg/public_html/MyApp/application.wsgi Order allow,deny Allow from all </Directory>
我不认为我可以访问主configuration文件, httpd.config当我看在/usr/lib/apache2/build我看到config.nice但没有看到httpd.config
使用mod_rewrite删除.PHP扩展名,同时清理GET URL
Apache的.htaccess重写 – 我可以移动到httpd.conf
我如何使mod_rewrite抑制处理更多的规则?
htaccess在localhost中工作,但在EC2实例中不起作用
.htaccessredirect到子域
我使用WinSCP连接到服务器,我没有shell访问权限。 当我去到url,我得到这个错误
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request
将URL中的4位数字replace为文本+ 4位数字
.htaccess mod_rewrite不能在子目录中工作
使用if语句的环境variables
为什么不是我的JavaScript和CSScaching?
利用第三方JS的浏览器caching
当我查看页面https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives
我看到WsgiScriptAlias指令的以下语法:
WsgiScriptAlias /name /web/wsgi-scripts/name
所以这个指令有两个参数:URI和wsgi脚本。 在你的情况下,可能是这样的:
WsgiScriptAlias / app /public_html/MyApp/application.wsgi
在/ app网址下公开您的应用程序。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。