我正在运行具有三个特定域的虚拟专用服务器。 比方说example1.com,example2.com,example3.com。
我在这个VPS上安装了webmin来执行一些简单的任务,只需要在友好的GUI(Bootstrap 3 Webmin主题)中pipe理一些操作。
我已经将webmin绑定到非默认端口,以便与CloudFlare的Flexible SSL兼容。 CloudFlare支持自由灵活的SSL端口8443,所以我决定运行Webmin端口8443而不是默认端口10000。
现在webmin端口可以在所有虚拟主机上访问。 所以我可以通过域名上的SSL达到webmin。
我真的希望它只是由一个特定的域名达成。 所以我只想webmin只是为了例如:
甚至在不同的域上的端口443上,例如:
而且不能在域1,2和3的端口上访问。有谁知道如何做到这一点?
所有的域都在CloudFlare之后,CloudFlare的DNS服务器指向我的VPS,它只有一个IPv4和一个IPv6地址。 用于pipe理我的虚拟主机的软件是Apache。
通常我会检查apache2 / httpd / nginx,或者无论你的webServer是configuration虚拟域。 通过这样做,您可以要求您的Web服务器根据最终用户input的主机名将HTTP请求路由到特定的位置。
对于apache2configuration应该看起来像(特定于webmin)。 用example1.com你的域名,10000 webmin的端口和/var/www/html主webmin目录。
/etc/apache2/sites-available/000-default.conf :
<VirtualHost example1.com:10000> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, eg #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost>