Apache - vHost - 禁止

时间:2015-10-17 23:53:52

标签: apache virtualhost vhosts

我正在尝试创建一个指向" *:9090"到特定目录。我会解释一下。

下面的图片显示它正在按照我想要的路径行事。

enter image description here

所以,我正在努力做到" *:9090"指向此路径(/ wamp / www / root / dev)。在我尝试的下面。

<VirtualHost *:9090>
DocumentRoot "c:/wamp/www/root/dev"

<Directory c:/wamp/www/root/dev>
    Options all
    Allow from all
    AllowOverride All
    Require all granted
</Directory>

现在,下面,我的结果打印。

enter image description here

我做错了什么?

1 个答案:

答案 0 :(得分:0)

在我使用它之前我遇到了同样的问题:

<Virtualhost *:80 >
    ServerName site.domain.com
    DocumentRoot /path/to/site
    <Directory /path/to/site>
        AllowOverride All
        Require all granted
    </Directory>

    ServerAdmin user@domain.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</Virtualhost>