2014-03-26 89 views
0

我期待建立一个子域如subdomain.domain.com如何设置子域名指向一个特定端口上的IP

我有我的域名与namescout专门登记,并没有任何运气至今设置它。

我基本上希望有我的subdomain.domain.com指向我的网络IP 192.120.146.113等,但也指向一个特定的端口说端口8080.迄今与namescout似乎很难/不可能。其他域名注册商是否允许您指向IP上的特定端口?

我都试过,包括主机名的端口为我的A记录等

感谢, 里斯

回答

0

的端口是由客户机请求,它不能由服务器设置。你有你的原因和结果切换。客户端请求某个端口和(子)域名。您无法指定他们在服务器上请求的内容。这样做没有用处。

也就是说,您可以定义当首先在端口8080上发出请求时会发生什么。

# 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

相关问题