Jump to content

Recommended Posts

Posted

hii @Krydos

i 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

.htaccess

RewriteEngine On

RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(wsgi/.*)$ - [L]
RewriteRule ^(.*)$ flask.wsgi/$1 [QSA,PT,L]

 

flask.wsgi

import os, sys
# edit your username below
sys.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 better
application.secret_key = 'secret'

 

 

myapp.py

import sys
from 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()
Posted

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?

Guest
This topic is now closed to further replies.
×
×
  • Create New...