view main.py @ 79:bd3e5fdd8398 1.0

Add apache site configuraton file for odfcase as wsgi application. Put the file apache-site.conf into /etc/apache2/sites-available/. It assumes that odfcast is installed as /home/mpuls/odfcast/releases/current and that there's a python environment with its site-packages in /home/mpuls/odfcast/env/lib/python2.7/site-packages. This is the setup used on the mpuls staging servers.
author Bernhard Herzog <bh@intevation.de>
date Wed, 25 Feb 2015 19:36:21 +0100
parents dcf870775c26
children
line wrap: on
line source
# -*- coding: utf-8 -*-
if __name__ == "__main__":
    from odfcast import app

    server_name = app.config['SERVER_NAME']
    if server_name and ':' in server_name:
        host, port = server_name.rsplit(':', 1)
        port = int(port)
    else:
        port = 5000
        host = "127.0.0.1"

    app.run(host=host, port=port)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)