How to setup subdomain that points to a specific port on an IP

Reece

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

krowe

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How setup subdomain in nginx?

How to setup a fallbackResource in a subdomain

How to setup nginx and a subdomain

How to check whether a subdomain is redirects correctly to the specific IP address with bash?

How to redirect subdomain to port (docker)

How to allow traffic from a specific IP for a specific port in UFW?

How to setup SSL certificate for A Record subdomain pointing to another server IP address

How to set the domain name and subdomain name on port 80 for same ip address?

SSL Certificate for subdomain that points to different server (Amazon Web Services) - Setup

How to find open port on specific IP address in Windows 10?

How can I kill a process running on a specific IP and port?

Wget command - how to download from a specific IP address and Port

How to redirect a domain to a different IP if accessed by a specific port?

How to reroute traffic to an ip to a specific port to display website

Answer redirect IP to specific port

How to setup SSL on AWS ALB subdomain?

How to setup a subdomain in a site's server?

How to create a subdomain which points to mobile site

How to access the subdomain of an IP address in the browser?

how to setup Wiremock dynamic port

Expose port of a specific container to external IP

VPN redirect user to specific IP and port

Allow only a specific ip address to an open port

Redirecting page to specific IP and port in lighttpd

How do I forward a SSH port from any interface to a specific IP?

In Symfony2 routing, how do I setup an optional subdomain

How to setup a subdomain in Route 53 when the DNS is hoted in Bluehost

How to setup subdomain for firebase project, The domain is registered with google

How to setup subdomain on the nuxt js with pm2?