1

How do I deploy a CherryPy app to my company intranet?

Right now I can access it from my computer with http://localhost:8080/.

I found this (and many others) with half answer: cherrypy.server.socket_host = '0.0.0.0'.

Then what?

What is the URI that allows any computer in the private network to access the app?

Is there any system configuration outside of CherryPy that I need to do? I'm working on Windows 7.

Community
  • 1
  • 1
stenci
  • 8,290
  • 14
  • 64
  • 104
  • The easiest way to do this is through SSH tunneling. I'm using `pagekite.py` (http://pagekite.net). It will make your `localhost` port available to anyone in the web. – joemar.ct May 11 '14 at 16:48
  • I looked at their website, and it looks like it's a service that I need to pay to make my server visible outside my intranet. I need just to see my CherryPy server from the computer of my private network only. Do I need to pay for something that simple? – stenci May 11 '14 at 17:53

1 Answers1

2

Use the IP of the pc or server you want to serve locally from...

cherrypy.server.socket_host = '192.168.0.147'
cherrypy.server.socket_port = 8080

Then go into your firewall and allow both inbound and outbound traffic on port 8080 or whatever port you've chosen.

Hope this helps!

Andrew Kloos
  • 4,189
  • 4
  • 28
  • 36
  • Is there a reason why the port should be 8080? In other words, how do I chose a port? – stenci May 12 '14 at 13:53
  • As long as you're not serving any other sites from IIS or another web server you should be able use port 80. – Andrew Kloos May 12 '14 at 14:21
  • 3
    No reason at all. Merely historical convention. However, under 1024, some ports are reserved or already bound. By the way, to make it easier, I would bind to 0.0.0.0 so CherryPy would listen on all of your interfaces. – Sylvain Hellegouarch May 12 '14 at 14:22