Try changing: import sys
sys.path.insert(0, '/home/debian/cve-search/web/') from index import Index application = Index() to: import sys sys.path.insert(0, '/home/debian/cve-search/web/') from index import Index application = Index().app > On 16 Jan 2018, at 9:33 pm, Graham Dumpleton <[email protected]> > wrote: > > What is the error you are getting and where do you see that error? > > Looking quickly at their code they don't provide a usable WSGI application > entry point that can be used with a standalone WSGI server. Instead they have > setup their code to use the Flask development server. That is okay for small > sites or if playing, but not production sites with a lot of traffic. > > I can't tell if creating an instance of Index and using it as an application > object will help, which is why I need to see the actual error message you are > getting. > > Graham > >> On 16 Jan 2018, at 9:18 pm, Gildásio Júnior <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi, guys! So, it's my first time using mod_wsgi, actually, is the first time >> that I want server a python application. >> >> I want host the application cve-search [0] using apache and mod_wsgi. The >> cve-search's web interface use Flask [1] and looking at Flask docs there is >> a section talk about wsgi [2]. The docs say to create a .wsgi file with: >> >> import sys >> sys.path.insert(0, '/path/to/the/application')from yourapplication import >> app as application >> >> So, my feeling is that wsgi call application.run(), or something like that, >> once that is this way that a flask application start a web server. But >> looking at cve-search code they doesn't follow this structure. To run the >> web server they call start() method in Index() class. >> >> I put this code on .wsgi but doens't work as well: >> >> import sys >> >> sys.path.insert(0, '/home/debian/cve-search/web/') >> >> from index import Index >> application = Index() >> >> Can someone help me, please? >> >> [0]: https://github.com/cve-search/cve-search >> <https://github.com/cve-search/cve-search> >> [1]: http://flask.pocoo.org/ <http://flask.pocoo.org/> >> [2]: http://flask.pocoo.org/docs/0.12/deploying/mod_wsgi/ >> <http://flask.pocoo.org/docs/0.12/deploying/mod_wsgi/> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "modwsgi" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <mailto:[email protected]>. >> To post to this group, send email to [email protected] >> <mailto:[email protected]>. >> Visit this group at https://groups.google.com/group/modwsgi >> <https://groups.google.com/group/modwsgi>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
