Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7812741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:36:40+00:00 2026-06-02T04:36:40+00:00

I have been trying to get Flask to work on my webfaction server for

  • 0

I have been trying to get Flask to work on my webfaction server for hours with no results.

I followed the instructions at http://flask.pocoo.org/snippets/65/

I have my index.py file stored under htdocs.

import sys
yourappname = "/home/<myusername>/webapps/myapp/htdocs"
if not yourappname in sys.path:
    sys.path.insert(0, yourappname)

from yourappname import app as application 

Then I have added this to my httpd.conf file:

WSGIPythonPath /home/yourusername/webapps/yourapp/htdocs/
#If you do not specify the following directive the app *will* work but you will
#see index.py in the path of all URLs
WSGIScriptAlias / /home/yourusername/webapps/yourapp/htdocs/index.py

<Directory /home/yourusername/webapps/yourapp/htdocs/>
   AddHandler wsgi-script .py
   RewriteEngine on
   RewriteBase /
   WSGIScriptReloading On
</Directory>

then i have myapp.py in the same htdocs directory next to index.py:

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello World!'

if __name__ == '__main__':
    app.run()

I have my domain pointed to my project in webfaction. The default index.py was working prior to me overwriting with the new one as stated in the instructions. However, I only get the server 500. I apologize but I am a complete noob when it comes to linux and managing servers. I cannot even access my error log under users because it says I do not have permission.

I think that it has something to do with my installation of flask on the linux server, i installed it through easy install it says it installed all of the dependencies and did not give any errors.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:36:43+00:00Added an answer on June 2, 2026 at 4:36 am

    A couple of suggestions:

    1. Shouldn’t you have myapp everywhere you have yourappname in your index.py?
    2. Also, I am assuming that you have made the appropriate substitutions in `WSGIPythonPath /home/yourusername/webapps/yourapp/htdocs
    3. Have you tried restarting the apache server by issuing a ~/webapps/<app_name>/apache2/bin/restart
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get nServiceBus to work with Ninject 2.0 as the
I have been trying to get this to work correctly and I think I
I have been trying to get this jsfiddle to work. So far without luck.
I have been trying to get CodeDom to work so I can dynamically create
I have been trying to get ActionBarSherlock ( http://www.actionbarsherlock.com ) working with my eclipse
I have been trying to get a response from a server sending a GET
I have been trying to get yui-css grid system to make a three column
I have been trying to get LastBootUpTime using Win32_OperatingSystem class (WMI). HRESULT hr =
I have been trying to get this one section of my UI to immediatly
I have been trying to get a USB HID keyboard working on an Android

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.