Hosting on Port 80
Most computers already have a built-in Web server running on port 80, and it's difficult to disable these, so the preferred solution is to run CL-HTTP on another port. The traditional port to use is port 8000.
You will export URLs on port 8000, with a call such as:
(export-url "http://www.mydomain.com:8000/demo.html" :computed :response-function 'write-demo-page)
The outside world can then connect to your server using URLs such as:
http://www.mydomain.com:8000/demo.html
If you prefer to have your site on port 80 as far as the outside world is concerned the best solution is to run CL-HTTP on port 8000, but redirect port 80 to port 8000. You will then export URLs on port 80:
(export-url "http://www.mydomain.com/demo.html" :computed :response-function 'write-demo-page)
The outside world can then connect to your server using URLs such as:
http://www.mydomain.com/demo.html
You can do the redirection using one of the following two solutions:
Using an external router
Use an external router to map incoming/outgoing traffic on port 80 to the Mac on port 8000.
Using the built-in firewall
The Mac has a built-in firewall (ipfw) which can redirect ports directly.
A shareware control-panel called WaterRoof is available for the Mac that will allow you to do the necessary configuration without editing configuration files:
http://www.hanynet.com/waterroof/
Use it as follows:
- Click NAT Setup.
- Enter the redirection:
- Save the configuration
- Click Enable NAT auto start.
blog comments powered by Disqus