Im strugling configuring the proxy to my small cherrypy website.
My cgi is configured as i can get to this sample laying in /www/cgi-bin/test.py when entering mydevice.local/cgi-bin/test.py
#!/usr/bin/python
print "Content-type:text/html\r\n\r\n"
print '<html>'
print '<head>'
print '<title>Hello Word - First CGI Program</title>'
print '</head>'
print '<body>'
print '<h2>Hello Word! This is my first CGI program</h2>'
print '</body>'
print '</html>'
then i tried this:
I followed the best resource i cold find: on digitalocean
for testing i used this wsgi.py:
def application(env, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
return ["Hello!"]
and server.py:
# Import your application as:
# from wsgi import application
# Example:
from wsgi import application
# Import CherryPy
import cherrypy
if __name__ == '__main__':
# Mount the application
cherrypy.tree.graft(application, "/")
# Unsubscribe the default server
cherrypy.server.unsubscribe()
# Instantiate a new server object
server = cherrypy._cpserver.Server()
# Configure the server object
server.socket_host = "0.0.0.0"
server.socket_port = 8080
server.thread_pool = 30
server.subscribe()
cherrypy.engine.start()
cherrypy.engine.block()
obvious there is something missing here, i do not see how to stich it together...