This allows to be run directly using mod_wsgi behind Apache.
]
}
-## WSGI
\ No newline at end of file
+## 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
\ No newline at end of file
# 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'])
\ No newline at end of file
+ app.run(host=config['listen']['addr'], port=config['listen']['port'])
+
+# Otherwise provide a variable called 'application' for mod_wsgi
+else:
+ application = app