如何为localhost / wordpress创建虚拟主机?

时间:2019-03-28 12:28:37

标签: wordpress macos xampp virtual virtualhost

我在本地安装了xampp的WordPress网站,并且一直在尝试为其创建虚拟服务器。

我添加了127.0.0.1 grey.local 在/ etc / hosts中的“ 127.0.0.1 localhost”下

在我添加的httpd.conf中

<VirtualHost :80>
    ServerName localhost
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/"
    <Directory "/Applications/XAMPP/xamppfiles/htdocs/">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost :80>
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/wordpress"
    ServerName grey.local
</VirtualHost>

但是http://grey.local/ 不断向我显示localhost,而不是预期的localhost / wordpress。

0 个答案:

没有答案
相关问题