Running nevow/twistd on a vhost
Published: Wednesday, Dec 26, 2007 Last modified: Monday, Dec 9, 2024
Reference: http://twistedmatrix.com/documents/current/howto/using-twistedweb Add the vhost to your DNS server…
hendry@bilbo:/etc/maradns$ egrep nevow dabase
Anevow.%|86400|194.100.133.7
Enable libproxy:
sudo dpkg-reconfigure apache
hendry@bilbo:/etc/maradns$ egrep proxy /etc/apache/modules.conf
LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so
Add the bits to httpd.conf:
<VirtualHost nevow.dabase.com>
ProxyPass / http://localhost:8081/
ServerName nevow.dabase.com
</VirtualHost>
Restart/Reload maradns/apache I chose port 8081 as the port I want the twistd to run on. Your .tac of course needs this value too. Ok, lets open a port to check everything is OK (OPTIONAL)
sudo iptables -I block -i eth0 -p tcp --dport 8081 -j ACCEPT
Ok, ok, lets run:
twistd -noy pastebin.tac