1、启动http_vhost.conf文件

在httpd-conf中,#virtual hosts

去掉前面的井号 # Includeconf/extra/httpd_vhost.conf

2、配置httpd_vhost.conf

<virtualHost 127.0.0.1:80>

 Dcoument "你的网站文件夹所在目录 d:/myblog"

  #配置首页

  DircoryIndex index.html

  <Dirctory />

  options FllowSymLinks

  #不允许别人修改我们的页面

  Allowoverride None

  #设置访问权限

  order allow,deny

  Allow form all

  </Directory>

</virtualHost>

3、修改本地的hosts文件(如果在网络上的dns服务器可以查到你的域名对应的ip地址,就不需要修改本地的hosts文件)

window/systems32/divers/ect/host

IP   对应的  域名

127.0.0.1   www.gaidalou.com

相关文章:

  • 2021-12-07
  • 2021-12-07
  • 2021-11-27
  • 2021-11-28
  • 2021-12-08
  • 2021-06-22
  • 2021-09-26
  • 2021-07-19
猜你喜欢
  • 2021-10-14
  • 2022-01-02
  • 2022-02-08
  • 2021-09-15
  • 2021-08-10
  • 2021-12-23
  • 2021-12-25
相关资源
相似解决方案