mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
powerdns: Define a application variable when not invoked from Shell
This allows to be run directly using mod_wsgi behind Apache.
This commit is contained in:
parent
541006c83d
commit
f773b24e25
@ -48,4 +48,14 @@ Should return something like:
|
||||
]
|
||||
}
|
||||
|
||||
## WSGI
|
||||
## WSGI
|
||||
You can run this backend directly behind an Apache server with mod_wsgi
|
||||
|
||||
WSGIScriptAlias / /var/www/pdns-backend-rgw.py
|
||||
|
||||
Placing that in your virtualhost should be sufficient.
|
||||
|
||||
Afterwards point PowerDNS to localhost on port 80:
|
||||
|
||||
launch=remote
|
||||
remote-connection-string=http:url=http://localhost/dns
|
@ -276,4 +276,8 @@ app.debug = config['debug']
|
||||
|
||||
# Only run the App if this script is invoked from a Shell
|
||||
if __name__ == '__main__':
|
||||
app.run(host=config['listen']['addr'], port=config['listen']['port'])
|
||||
app.run(host=config['listen']['addr'], port=config['listen']['port'])
|
||||
|
||||
# Otherwise provide a variable called 'application' for mod_wsgi
|
||||
else:
|
||||
application = app
|
||||
|
Loading…
Reference in New Issue
Block a user