kbraj Posted November 20, 2020 Posted November 20, 2020 hii @Krydosi am trying to deploy flask application on webroot. but i am getting 500 server error can you guide me on this. i have done changes in .htaccess and flask.wsgi file. original https://flazepe.gitbook.io/heliohost/tutorials/flask modified.htaccessRewriteEngine OnRewriteBase /RewriteRule ^(media/.*)$ - [L]RewriteRule ^(admin_media/.*)$ - [L]RewriteRule ^(wsgi/.*)$ - [L]RewriteRule ^(.*)$ flask.wsgi/$1 [QSA,PT,L] flask.wsgiimport os, sys# edit your username belowsys.path.append("/home/kbraj/public_html/flask");sys.path.insert(0, os.path.dirname(__file__))from myapp import app as application# make the secret code a little betterapplication.secret_key = 'secret' myapp.pyimport sysfrom flask import Flask, __version__app = Flask(__name__)application = app@app.route("/")def hello(): return """ HelioHost rules!<br><br> <a href="/flask/python/version/">Python version</a><br> <a href="/flask/flask/version/">Flask version</a> """@app.route("/python/version/")def p_version(): return "Python version %s" % sys.version@app.route("/flask/version/")def f_version(): return "Flask version %s" % __version__if __name__ == "__main__": app.run()
Krydos Posted November 21, 2020 Posted November 21, 2020 You were actually violating two of our terms of service. You have more than one account, and your second account was created using a temporary email address. Don't worry. I suspended the second account so you don't appear to be violating our terms anymore. It looks like your site is working though. Do you still need help?
Recommended Posts