Subdomain ubuntu 12.04中端口号为的子域
我已经在DNS服务器中创建了子域,我想知道如何设置每个子域,使其只接受通过特定端口的连接Subdomain ubuntu 12.04中端口号为的子域,subdomain,Subdomain,我已经在DNS服务器中创建了子域,我想知道如何设置每个子域,使其只接受通过特定端口的连接 例如:ftp.example.com--->仅接受来自端口21的连接您可以使用iptables设置端口限制-只需谷歌一下即可 您还可以在服务器本身上设置端口限制,这取决于您的服务器体系结构。如果您正在运行Apache,那么应该看看如何定义虚拟主机(vhost) 只是为了举例说明: <VirtualHost *:21> ServerAdmin webmaster@example.c
例如:ftp.example.com--->仅接受来自端口21的连接您可以使用iptables设置端口限制-只需谷歌一下即可 您还可以在服务器本身上设置端口限制,这取决于您的服务器体系结构。如果您正在运行Apache,那么应该看看如何定义虚拟主机(vhost) 只是为了举例说明:
<VirtualHost *:21>
ServerAdmin webmaster@example.com
ServerName ftp.example.com
# Index + Directory root
DirectoryIndex index.php | index.html
DocumentRoot /var/www/path/to/site
</VirtualHost>
服务器管理员webmaster@example.com
ServerName ftp.example.com
#索引+目录根
DirectoryIndex.php | index.html
DocumentRoot/var/www/path/to/site
请看“*:21”-这是端口号
一般来说,ftp.example.com可能仍然会重定向到服务器的根目录