1、在wamp的安装目录 \bin\apache\Apache2.4.4\conf 中找到  httpd.conf文件删除 Include conf/extra/httpd-vhosts.conf 这一行前面的注释,选择启用虚拟机的配置文件。

2、打开extra文件夹,找到httpd-vhosts.conf文件,然后在里面加入以下的配置参数命令。

 <VirtualHost *:80>
       ServerName www.st.cn
       DocumentRoot "E:\www.st.cn"
 </VirtualHost>

 3、如果访问的时候提示404错误,试试修改<Directory />命令成:

<Directory />
   Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

 4. 如果还是提示 Forbidden 错误,那么修改 Directory中最后一句话

<Directory />
   Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Require all granted
</Directory>

相关文章:

  • 2021-08-24
  • 2022-01-04
  • 2022-02-09
  • 2021-12-05
  • 2021-11-19
  • 2021-10-28
  • 2021-07-16
  • 2022-12-23
猜你喜欢
  • 2021-07-02
  • 2022-12-23
  • 2022-02-19
  • 2021-12-20
  • 2021-11-18
  • 2021-05-17
相关资源
相似解决方案