当前位置:   article > 正文

Mac修改hosts 设置虚拟域名_mac 上host如何配置端口

mac 上host如何配置端口

首先配置端口 

访达窗口下按command + shift + G,出现前往文件夹选项,输入路径/private/etc/apache2/extra。进入文件夹后打开文件httpd-vhosts.conf,设置端口。如:

  1. Listen 8000
  2. <VirtualHost *:8000>
  3. ServerAdmin webmaster@dummy-host2.example.com
  4. DocumentRoot "/Library/WebServer/Documents"
  5. ServerName zhihuitou.com
  6. ErrorLog "/private/var/log/apache2/webServer_log"
  7. CustomLog "/private/var/log/apache2/webServer_log" common
  8. </VirtualHost>

详情端口设置参照Mac 下apache2.4配置多端口

然后相同方法回到路径/private/etc,打开hosts文件。在下边键入要设置的虚拟域名。如:

127.0.0.1 www.zhitoufang.com

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/224552
推荐阅读
相关标签
  

闽ICP备14008679号