#
# to run PCTTY bank from within a NAT network
#
# 1) compile apache with mod_proxy
# 2) place directives like the following in your httpd.conf files
# may not need this, but try it out
AllowOverride FileInfo AuthConfig Limit
Order Allow,Deny
Allow from all
# ProxyRequest On is usually dangerous for your apache server
# as anyone in the world can order any webpage in the world through you
# (and someone will sending your bandwidth bills way up there)
#
# However the following directories limit proxying to any URLS beginning from either
#
# http://192.168.1. # this is your internal network
# http://calltty.co # this should be the beginning of your URL
#
# Sadly, Apache only seems to allow 10 ProxyMatch configuration directives
# or you could completely protect your network.
#
# The idea is that you replace the letters in the regular expressions with
# the letters in your domain name.
# It is recommended you omit www from the domain name as this wastes 3 precious
# characters out of the 10.
#
ProxyRequests On
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
Order allow,deny
Deny from all
#
# Now construct a ProxyPass directive for each one of your PCTTY programs
#
# /pctty/web/pctty81.html is the web page name that the apache web server
# will accept (as if it were on its own machine)
#
# and http://192.168.1.38:81/chatclient.html
#
# is the actual web URL for the chatclient.html webpage that PCTTY will
# provide. Apache web server will proxy to this URL when it receives a
# request for /pctty/web/pctty81.html
#
# scheduler.cgi will have 'pctty81.html' in an array of PCTTY client machines
# that it will schedule
ProxyPass /pctty/web/pctty81.html http://192.168.1.38:81/chatclient.html
ProxyPass /pctty/web/pctty82.html http://192.168.1.38:82/chatclient.html
# this is an example of a windows machine with 2 PCTTYs running
ProxyPass /pctty/web/pctty81a.html http://192.168.1.39:81/chatclient.html
ProxyPass /pctty/web/pctty82a.html http://192.168.1.39:82/chatclient.html
# allow the connect method through these ports (one port per PCTTY client program
#
# the PCTTY chat applet (at the customer's browser) will open a socket to
# the apache web browser and then run the CONNECT HTTP method for the internal
# ip address and port address of the PCTTY computer program (running on the windows machine)
# so if the PCTTY program is on 192.168.1.39 and listening on 6667 for chat
# open port 6667 below
AllowCONNECT 6667 6668