Question

I am looking to setup a subdomain eg subdomain.domain.com

I have my domain registered with namescout specifically and haven't had any luck to date setting it up.

I am essentially looking to have my subdomain.domain.com point to my network IP 192.120.146.113 etc but also to point to a specific port say port 8080. So far with namescout it seems difficult/impossible. Do other domain registrars allow you to point to a specific port on an IP?

I have tried including the port in the host name for my A records etc.

Thanks, Reece

Was it helpful?

Solution

The port is requested by the client machine, it cannot be set by the server. You have your cause and effect switched. The client request on a certain port and (sub) domain name. You cannot specify what they requested on the server. It would not be useful to do so.

That being said, you can define what happens when the request is made on port 8080 in the first place.

# Ensure that Apache listens on port 8080
Listen 192.120.146.113:8080

<VirtualHost 192.120.146.113:8080>
  DocumentRoot /www/example1
  ServerName www.example.com
  # Other directives here
</VirtualHost>

<VirtualHost 192.120.146.113:8080>
  DocumentRoot /www/example2
  ServerName www2.example.com
  # Other directives here
</VirtualHost>

http://httpd.apache.org/docs/2.2/vhosts/examples.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top