Home » Questions » Computers [ Ask a new question ]

How to forward a public (network-accessible) port to a local (port or host)

How to forward a public (network-accessible) port to a local (port or host)

"I'm using Ubutnu 9.04, and XAMPP as a testing server for my websites.
What I want to do is make my websites network-accessible. For now only the my-ip-address:80 is accessible and managed by XAMPP.
But I want to add more ports like my-ip-address:41100 for example and make it forwarding to a specific local host like (my-custom-domain.local) which I made by editing/configuring on /etc/hosts file and also /opt/lampp/etc/extra/httpd-vhosts.conf."

Asked by: Guest | Views: 53
Total answers/comments: 1
Guest [Entry]

"Finally I found a solution:

Make Apache listen to multiple ports like (44100, 44101, ..., 44199) because it's unused/unregistered ports. [you can edit httpd.conf of ports.conf to do this]
Allow incoming connections to these ports.
Add new virtual hosts and configure Apache to use these ports for those hosts (each host corresponds to one port)."