[Twisted-Python] specifying the site and port to a twisted web server
![](https://secure.gravatar.com/avatar/e58fe4da691361b5214f8ebb0c1a08a6.jpg?s=120&d=mm&r=g)
I have written a highly simplified twisted web server using twisted extending one of the demos, but I have one small problem. I cannot see out how to arrange to have the server listen one particluar address:port combination. The system I want to use it on has a pair of NICs and I need the server to listen on one NIC and not the other due to port conflicts. Any help would be appreciated.
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On Tue, 2007-02-27 at 20:20 -0800, Dennis Allison wrote:
I have written a highly simplified twisted web server using twisted extending one of the demos, but I have one small problem.
I assume there was good reason for not using twisted.web? or even web2?
listenTCP(80, factory, interface="127.0.0.1")
![](https://secure.gravatar.com/avatar/e58fe4da691361b5214f8ebb0c1a08a6.jpg?s=120&d=mm&r=g)
Thank you. My server is a twisted.web server. For some reason, I missed the "interface" parameter when I was reading the code the first couple of times--I finally figured it out late last night. For a system as rich as twisted, the documentation is sparse. On Wed, 28 Feb 2007, Itamar Shtull-Trauring wrote:
--
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On Tue, 2007-02-27 at 20:20 -0800, Dennis Allison wrote:
I have written a highly simplified twisted web server using twisted extending one of the demos, but I have one small problem.
I assume there was good reason for not using twisted.web? or even web2?
listenTCP(80, factory, interface="127.0.0.1")
![](https://secure.gravatar.com/avatar/e58fe4da691361b5214f8ebb0c1a08a6.jpg?s=120&d=mm&r=g)
Thank you. My server is a twisted.web server. For some reason, I missed the "interface" parameter when I was reading the code the first couple of times--I finally figured it out late last night. For a system as rich as twisted, the documentation is sparse. On Wed, 28 Feb 2007, Itamar Shtull-Trauring wrote:
--
participants (2)
-
Dennis Allison
-
Itamar Shtull-Trauring