0

我的httpd-vhosts.conf文件看起来像这样。我正在尝试创建 2 个虚拟主机。其中一个项目存在于默认文档根目录中,而另一个项目则完全位于另一个硬盘驱动器上。

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "C:/wamp/www/project1/public_html"
    ServerName p1.localhost
    ServerAlias www.p1.localhost
    ErrorLog "logs/p1.localhost.log"
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "E:/Other Media/www"
    ServerName pn.localhost
    ServerAlias www.pn.localhost
    ErrorLog "logs/pn.localhost.log"
    CustomLog "logs/pn.localhost.log" common
    <Directory "E:/Other Media/www">
        Options Includes Indexes FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

我还将这个块添加到我的httpd.conf

<Directory "E:/Other Media/www">
    Order allow,deny
    Allow from all
</Directory>

/wamp/www正如所料, works文件中的VH ,但我E:驱动器上的项目不会显示!

任何意见,将不胜感激!

4

2 回答 2

1

那么还有其他简单的解决方案。你可以在这里找到一个,http://www.tech99.us/wamp-configuring-virtual-directory/

通过使用 wamp> apache>alias>add alias 你可以很容易地配置外部目录。

于 2012-08-12T08:30:16.280 回答
0

我最终把所有东西都移到了EasyPHP上。它更优雅地处理外部磁盘位置。

于 2012-06-19T16:09:09.477 回答