This documentation explains requirements and tips for integrating the Python agent with apps that use Apache/mod_wsgi
or mod_wsgi-express
. To return to the general install instructions, go to Install the for Python agent.
Use Apache/mod_wsgi
The Python agent supports the use of Apache/mod_wsgi
. Follow the standard instructions for manual integration with your Python application when using Apache/mod_wsgi.
注意
The recommended integration procedure of running the admin script via the command line cannot be used with Apache/mod_wsgi.
Use mod_wsgi-express
A new feature, called mod_wsgi-express
, was introduced in version 4.1.0 of mod_wsgi
, and it offers an alternate way to integrate the agent.
If you are using mod_wsgi-express
with a WSGI application, it is possible to use the script's --with-newrelic
option with your app's startup command. Although the mod_wsgi-express
script and --with-newrelic
flag are different than the newrelic-admin
script, they serve the same purpose of configuring your application to wrap the execution of your server.
When using the --with-newrelic
option, make sure the Python agent is installed and you've created your newrelic.ini
config file.
For example, using the agent with Django may require a command similar to:
NEW_RELIC_CONFIG_FILE=newrelic.ini mod_wsgi-express start-server mysite/wsgi.py --with-newrelic
For more help
For more details, contact the Apache/mod_wsgi author on the mod_wsgi mailing list.
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicの とandドキュメント をご確認ください。