1.找到安装Apache路径下的httpd-vhosts.conf文件

Apache如何配置域名

2.编辑打开末尾追加

<VirtualHost *:80>
    DocumentRoot "f:/apache/Apache2.4/htdocs/zjc"//域名内容的存放路径
    ServerName www.album.com
    ServerAlias album.com
</VirtualHost>
<Directory "f:/apache/Apache2.4/htdocs/zjc">
    Require all granted//给所有权限
</Directory>

3.在C:\Windows\System32\drivers\etc中记事本打开hosts,末尾追加本地地址、域名

Apache如何配置域名

4.重启Apache即可

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-12-02
  • 2022-01-07
  • 2021-06-25
  • 2021-08-11
  • 2021-08-21
猜你喜欢
  • 2021-07-16
  • 2022-12-23
  • 2021-11-18
  • 2021-12-01
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案