通用技术 [求助] mac 电脑配置虚拟域名,其他电脑访问不能解析

匿名 · 2017年05月16日 · 440 次阅读

场景

主场景:

A 电脑(Mac)作为服务器,B 电脑通过域名访问 (A、B 同一局域网)

问题:

A 电脑配置了虚拟域名,A 电脑 hosts 也配置了域名,所以 A 电脑可以 ip 和域名正常访问
B 电脑可以通过 A 的 IP 访问,但是通过域名则无法解析,只能 B 的 hosts 也指定域名的 IP 才可以访问,
能不能在不通过 hosts 指定的方式通过域名来访问。

配置方法参考文章
配置参数:
vim /etc/apache2/extra/httpd-vhosts.conf

<VirtualHost *:80>
    ServerAdmin webmaster@rym.devci.com
    DocumentRoot "/Library/WebServer/Documents"
    ServerName rym.devci.com
    ErrorLog "/private/var/log/apache2/rym.devci.com-error_log"
    CustomLog "/private/var/log/apache2/rym.devci.com-access_log" common
    <Directory "/Library/WebServer/Documents">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Require all granted
                Order allow,deny
                Allow from all
    </Directory>
</VirtualHost>

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册