List Info

Thread: Re: easy n00b question




Re: easy n00b question
country flaguser name
United States
2007-09-04 09:48:28


On Sep 4, 4:25 pm, "Arnar Birgisson"
<arna...gmail.com> wrote:
> On 9/4/07, Dr Mephesto <dnh...googlemail.com> wrote:
>
> > I have been working on app in cherrypy, and it
looks great on
> >http://localhost:8080/
>
> > So, why can't I see it from other machines on my
network when I use my
> > development machine's IP address?
>
> If you use the provided tutorial then by default it
listens on
> localhost, 127.0.0.1 - which is only accessible from
itself. To get to
> it from other computer you must make it listen either
on your public
> interface or all interfaces.
>
> You change the listen inteface by setting the
"server.socket_host" to
> the IP of your interface. To listen on all interfaces
use the ip
> "0.0.0.0" (I think).
>
> > I've spent about an hour looking though the
documentation, must I must
> > be blanking the info out, like the salt shaker
thats right in front of
> > you... 
>
> Totally not your fault, I wen't through the exact same
problems when I
> started with CP. This is exactly the problem I feel
cp's docs have,
> information like this is hard to find if you don't know
where to look
> and it's not mentioned in the tutorial (or linked to
for that matter).
> Unfortunately I don't have the time to fix it myself..
:-(
>
> hth,
> Arnar


I'm using the latest version of everything, but I am
beginning to
think its a setup issue with my version of OSX. I just
noticed I cant
seem to access the in-built apache server using my IP
either... I will
give it all a go on my windows box this week some time, but
thanks for
help Arnar and Christian!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: easy n00b question
country flaguser name
Australia
2007-09-04 19:54:57
Dr Mephesto wrote:

>> Totally not your fault, I wen't through the exact
same problems when I
>> started with CP. This is exactly the problem I feel
cp's docs have,
>> information like this is hard to find if you don't
know where to look
>> and it's not mentioned in the tutorial (or linked
to for that matter).
>> Unfortunately I don't have the time to fix it
myself.. :-(

I found that you need to set the ip address of the machine
in the 
configuration. Unlike 2.1, where  you could set 127.0.0.1 as
the ip 
address in CP and you could access it externally using the
machine's ip 
address, in 3.0.2 you need to set the ip address of the
machine in the 
global configuration. This opens up CP to external access
(don't ask me 
why, but at a guess it's security related).

ip_address = socket.gethostbyname(socket.gethostname())
global_conf = {'server.socket_host' : ip_address}
...etc

-- 
Alexander C. Le Dain, PhD
Software Engineer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )