在D:\xampp\apache\conf\extra\httpd-vhosts.conf文件中添加如下内容:


NameVirtualHost 
*:80

<VirtualHost *:80>
    DocumentRoot 
"D:/xampp/htdocs/"
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot 
"E:/php/wordpress"
    ServerName wordpress
</VirtualHost>

<Directory "E:/php/wordpress">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow
,deny
    Allow from all
</Directory>

 

在C:\WINDOWS\system32\drivers\etc目录下的hosts文件中添加如下内容:

127.0.0.1    wordpress

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-11-13
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2022-01-01
  • 2022-01-01
  • 2022-12-23
  • 2021-12-01
  • 2021-07-13
  • 2021-09-28
相关资源
相似解决方案