-1

I have an application that I had created with Cherrypy and now I got a folder path to locate my scripts inside

\\rus4ias.ias.uni-stuttgart.de\websonne\infoscreen

and a link for my application is here . When I visit the page I see that it written Apache/2.2.21 (Linux/SUSE). Thats all what I have currently. Moreover I have almost no idea how to deploy my application into that server. Until now all the applications running there at server are PHP so it will be first Python framework deployment. Can you please advise some sources and tutorials for that?

zoranc
  • 2,410
  • 1
  • 21
  • 34

1 Answers1

0

Well first off cherrypy is an HTTP framework. It does not require apache server at all - it can be run and used on it's own. In essence it has all the necessary ingredients to run a webserver. I would suggest going over the documentation. But here is a tiny small example - stop the apache service and run the following script:

import cherrypy

class test():

    @cherrypy.expose
    def index(self):
        return "hello, hello, hello"

if __name__ == "__main__":
    cherrypy.config.update( {'server.socket_host':"0.0.0.0", 'server.socket_port':8080 } )
    cherrypy.quickstart(test())

Now head over to 127.0.0.1:8080 and you should be seeing hello, hello, hello.

If however you want to run cherrypy behind apache, you need to use Mod_WSGI: http://tools.cherrypy.org/wiki/ModWSGI

Now it's not clear if you want to run cherrypy alongside apache and another application. That can also be achieved in yet another way - use cherrypy's cherrypy.dispatch.RoutesDispatcher()

Alexander Ejbekov
  • 5,594
  • 1
  • 26
  • 26