Local python web server problem

  • Thread starter Farsheed Ashouri
  • Start date
F

Farsheed Ashouri

Hi everyone. I have started to develop a web base software for
renderfarm managing.
I run the cherrypy hello world! example and when I visit
127.0.0.1:8080
on firefox, a nice "Hello World" appears. I am on ubuntu and my ip in
local network is 192.168.100.18
but when I visit 192.168.100.18, there is another page: "It Works!".
What is "It Works!"? and when I type 192.168.100.18:8080 in another
local pc, the page didn't load?

Sorry I am newbie in network area, so I have these two questions:
1- How can I serve my page in local network?
2- what is "It Works!" in 192.168.100.18? we have
192.168.100.<10-70> . no pc has this but mine!!!

3- Could you please explain me or at least point me to the right
direction of making little local web server, localhost?

4- How can I access to the server that serves web page in 56566 port?
I try 192.168.100.18:56566
but the page could not load. I can ping 192.168.100.18 but I can't
load web pages from it.
Why?


Thanks and sorry for my bad English.
 
G

Gerhard Häring

Farsheed said:
Hi everyone. I have started to develop a web base software for
renderfarm managing.
I run the cherrypy hello world! example and when I visit
127.0.0.1:8080
on firefox, a nice "Hello World" appears. I am on ubuntu and my ip in
local network is 192.168.100.18
but when I visit 192.168.100.18, there is another page: "It Works!".
What is "It Works!"? and when I type 192.168.100.18:8080 in another
local pc, the page didn't load? [...]

Services like HTTP servers "bind" not only to a port, but to a
combination of IP address and port.

The CherryPy tutorial configuration

http://www.cherrypy.org/browser/trunk/cherrypy/tutorial/tutorial.conf

binds to 127.0.0.1 and 8080. This means the application can only be
accessed from the local machine.

To bind to all network interfaces, (i. e. Ethernet etc., and not just
the loopback device), you can change server.socket_host to "0.0.0.0".

-- Gerhard
 
R

Rob

I run the cherrypy hello world! example and when I visit
127.0.0.1:8080
on firefox, a nice "Hello World" appears. I am on ubuntu and my ip in
local network is 192.168.100.18
but when I visit 192.168.100.18, there is another page: "It Works!".
What is "It Works!"? and when I type 192.168.100.18:8080 in another
local pc, the page didn't load?

You need to have the server listen on 192.168.100.18 not 127.0.0.1.
They are different. 127.0.0.1 is visible only locally. The
192.168.100.18 is visible both locally and from other hosts.

I don't use cherrypy so don't know how you set this up. Are you using
apache to host cherrypy or does it have it's own web server? If your using
apache the IP address is selected with the Listen directive normally in
the /etc/apache2/ports.conf file.
Thanks and sorry for my bad English.
Your english is good.

Rob
 
F

Farsheed Ashouri

Thanks guys, Really appreciate your help. I am trying to solve the
problem and will keep you posted when I found a solution.

Farsheed Ashouri,
Tehran, Iran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top