AuthUserFile /var/www/virtual/USER/.htuser Require valid-user On the client side, specify user and password in the config file as documented in the main README. You can prettify the URL format by adding a file ~/html/.htaccess with content RewriteEngine On RewriteRule ^financeager/(.*)$ /fcgi-bin/financeager.fcgi/$1 [QSA,L] Force a restart of the FCGI app by killing the existing one. This allows you to access via http://USER.STAR.uberspace.de/financeager Further reading: https://blog.lucas-hild.de/flask-uberspace https://gist.github.com/tocsinDE/98c423da2724d23c02ff https://docs.python.org/3.4/howto/webservers.html https://wiki.uberspace.de/webserver:htaccess#verzeichnisschutz """ from flipflop import WSGIServer from financeager_flask import DATA_DIR, fflask if __name__ == "__main__": # Configure to your liking app = fflask.create_app(data_dir=DATA_DIR, # config={"DEBUG": True}, ) WSGIServer(app).run()
def run(self): if stat.S_ISSOCK(os.fstat(0).st_mode): from flipflop import WSGIServer WSGIServer(self).run() else: super().run("0.0.0.0", 32032, threaded=True)
params = dict(urllib.parse.parse_qsl(environ.get('QUERY_STRING', ''))) #print >> sys.stderr, 'params="%s"\n' % params if path == "/phones": return settings.handle_phones(environ, start_response, params) if path == "/online_credentials": return settings.handle_online_credentials(environ, start_response, params) if path == "/get_list": return settings.handle_get_list(environ, start_response, params) if path == "/get_lists": return settings.handle_get_lists(environ, start_response, params) if path == "/get_online_scripts": return settings.handle_get_online_scripts(environ, start_response, params) if path == "/callerlog": return journal.handle_callerlog(environ, start_response, params) if path == "/journal": return journal.handle_journal(environ, start_response, params) # return error start_response('404 NOT FOUND', [('Content-Type', 'text/plain')]) return ['Not Found'] if __name__ == '__main__': from flipflop import WSGIServer WSGIServer(application).run()
#!flask/bin/python from flipflop import WSGIServer from app import app if __name__ == '__main__': WSGIServer(app).run(host='0.0.0.0', debug=True) #app.run(host='0.0.0.0', debug=True)