apache 本地目录映射配置

监听92端口,localhost 默认指向 0.0.0.0也是127.0.0.1

重启,打开localhost:92 完成

 上面是端口号

 

2.本地域名映射

我在本地写一个域名,加载跳的是我本地配置的域名映射的目录

1.在extra/httpd-vhosts.conf里面写一条

<VirtualHost localhost:80>
    ServerName ansdksk.com
    DocumentRoot F:\目录地址
    <Directory  "F:\E\目录地址">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

2.C:\Windows\System32\drivers\etc\host

# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost
127.0.0.1       localhost
127.0.0.1       ansdksk.com

posted on 2020-03-22 13:39  chenyi4  阅读(1052)  评论(0)    收藏  举报

导航