English 中文(简体)
apache 服务器 8080 端口与 cherrypy 冲突
原标题:apache server 8080 port conflict with cherrypy

我听到关于樱桃 和好奇心 试图运行这个脚本。

import cherrypy
class HelloWorld(object):
    def index(self):
        return "Hello World!"
    index.exposed = True

cherrypy.quickstart(HelloWorld())

to run this i needed to stop my apache which was already running. after running this for the first time i got the "Hello World" output but now when i am trying to access my localhost:8080 the browser goes into an indefinite long loading state i think their is some conflict between cherrypy and apache or something help me out plz what to do ? Thanks

问题回答

你可以定义切利皮港应该听什么。

通过在 < 强切rypy. quickstart () 之前发布 < 强切rypy. config. update () ,您可以更改服务器监听的端口。 例如,在我的例子中,它为 7077 。

cherrypy.config.update({ server.socket_port : 7077})

关于樱桃Py配置的更多信息,请参见此文件





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签