Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

I got an internal server error, when run the ip address

I learning how to deploy a flask app, using amazon lightsail, i made linux server configuration to deploy that app, but when run the ip address i got internal server error, i see the errors on apache2/error.log and it was Target WSGI script '/var/www/FlaskApp/flaskapp.wsgi' cannot be loaded as Python module, can anyone help me

3 Answers

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,716 Points

What web server are you using for deployment? I have a bit of familiarity with Amazon EC2 but not Lightsail.

You might want to read over the following documentation:

http://flask.pocoo.org/docs/1.0/deploying/

You might consider Python Anywhere. They have a free "beginner account" option that you can use during your testing phases.

http://pythonanywhere.com

thank you for your responding, i use amazon lightsail as web server, after hours of searching i did it using virtual environment in linux configuration, and now my web site is deployed, you can visit it on http://3.122.95.117/, but new problem was raised, in login session, i use google plus ouath, when trying to login i got permission denied, any thoughts ?

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,716 Points

I went to your site... Very cool start on that! Did you use Nginx/Gunicorn?

I use LDAP for authentication on the software I develop at my workplace.

I am a little out of my depth on OAuth2, but you might want to implement for another platform other than Google to start-- like GitHub or Twitter is supposed to be a little easier.

i did not use Nginx/Gunicorn, just amazon lightsail

i did some research and i found the in order to use google plus api oauth i have to use admin name, not ip address

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,716 Points

Again, very cool stuff and thanks for sharing.

I did a Netcraft report on your site and see that Lightsail is using Apache as the webserver, but it doesn't show the WSGI worker (this is the program that runs your flask app). But it does show things that are visible to viewers of your site, like the physical location of the server, the Javascript and CSS content delivery networks and other sites that use similar stacks.

Here is the Netcraft report on your URL.

https://toolbar.netcraft.com/site_report?url=http%3A%2F%2F3.122.95.117