This started as an effort to display a more useful error message in the Apache error log if retrieving the schema failed. I broadened the scope a little to include limiting the output in the Apache error log so errors are easier to find. This adds a new configuration option, startup_traceback. Outside of lite-server.py it is False by default so does not display the traceback that lead to the StandardError being raised. This makes the mod_wsgi error much easier to follow.
18 lines
395 B
Python
18 lines
395 B
Python
"""
|
|
WSGI appliction for IPA server.
|
|
"""
|
|
|
|
from ipalib import api
|
|
api.bootstrap(context='server', debug=True, log=None)
|
|
try:
|
|
api.finalize()
|
|
except StandardError, e:
|
|
api.log.error('Failed to start IPA: %s' % e)
|
|
else:
|
|
api.log.info('*** PROCESS START ***')
|
|
import ipawebui
|
|
ui = ipawebui.create_wsgi_app(api)
|
|
|
|
# This is the WSGI callable:
|
|
application = api.Backend.session
|