Why am I getting 500 Internal Server Error on Flask app?

تعرفه تبلیغات در سایت
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I am setting up Flask on Digital Ocean. I followed their simple instructions to get started. The location for the instructions are here: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps That's what I followed. Although, I should add that I did add a domain to my site, so that I'm not just testing it with the IP.

    It is unclear to me whether or not the virtualenv needs to be activated or not. I mean theoretically, it seems that you would need the venv both in production and in development for the purpose of avoiding conflicts. However, how does apache2 and the wsgi module know to use this venv?

    Also, in the hierarchy of directories, I have /var/www/FlaskApp/flaskapp.wsgi Then I have /var/www/FlaskApp/FlaskApp/venv/ and this is where I installed Flask.

    Then I have '/var/www/FlaskApp/FlaskApp/__init__.py' which has my very simple test page.
    

    I have tried changing ownership of the directories to www-data:www-data, since I am using Ubuntu. I set the permissions such that all the directories have executable permissions.

    This is so preliminary and so basic, that I cannot figure out what the problem is. The only thing I noticed and had trouble changing, is the hostname. Digital Ocean lets one choose a droplet name. I did change the /etc/hostname file to use my domain. However, when I issue the command hostname it reports the name of the droplet. This is when I am connected via ssh.
    I also added my domain to the hosts file with the public IP of my vps (droplet) followed by my domain name. These things did not fix anything.

    So, I'm very stumped. Thanks, Bruce

    asked 1 min ago

    نویسنده : استخدام کار بازدید : 67 تاريخ : شنبه 30 ارديبهشت 1396 ساعت: 11:30
    برچسب‌ها :

    خبرنامه

    عضویت

    نام کاربري :
    رمز عبور :