2

Let's assume I have configured few VirtualHosts on my Apache2:

  • sub1.domain.com:8080
  • sub2.domain.com:8080
  • sub3.domain.com:8080

I can access them by typing in my browser with full http://sub1.domain.com:8080/ - that's not a problem. But I'm looking for a solution to access same subdomain but without typing port number.

Assuming sub*.domain.com is not binded to any VirtualHost. How can I access this subdomains without typing port number on specified local machine?

Imagine situation - I have a 10 PC's with same external IP and I want that PCs to always map http://sub1.domain.com/ to http://sub1.domain.com:8080/ . PCs are Windows/Linux/Mac - is there any place in system where I can easily map this /or better/ can I do it with my local firewall /or/ somehow?

cadavre
  • 1,334
  • 1
  • 18
  • 34
  • So you just need to change this behavior for those 10 PC's or do you want to actually perform port forwarding on the server? Is there anything listening on Port 80 on those same subdomains? – Mike Brant Feb 13 '14 at 20:09
  • @SLaks can you explain yourself? – jcho360 Feb 13 '14 at 20:27
  • @jcho360: The hosts file is only for name resolution. It has nothing to do with ports. – SLaks Feb 13 '14 at 20:36
  • Yes, I don't want to forward all on server. There are also public hosts on port 80 working. I want it only for those 10 PCs (or all PCs in my local network). – cadavre Feb 14 '14 at 10:42
  • take a look here: http://stackoverflow.com/questions/13155529/how-to-remove-port-number-from-http-localhost8123-to-use-as-http-localhost?rq=1 – jcho360 Feb 14 '14 at 12:24

0 Answers0