在vhost文件中使用符号链接

时间:2014-04-08 17:34:47

标签: apache

我正在运行我的服务器而且我正在使用vhost文件。我想在DocumentRoot参数中使用符号链接。看看:

<VirtualHost *:80>
ServerAdmin root@localhost.com
DocumentRoot "/www/html/example"
ServerName example.com
ErrorLog "logs/example"
CustomLog "logs/example" common
</VirtualHost>

我有/ var / apache / www中的符号链接 - &gt; / EBS1 /阿帕奇/万维网

我怎样才能让它发挥作用? Apache没有遵循符号链接!

1 个答案:

答案 0 :(得分:1)

<VirtualHost *:80>
    DocumentRoot /var/apache/www
    ServerName example.com 
    <Directory  /var/apache/www>
        Options FollowSymlinks
    </Directory>
</VirtualHost>

http://httpd.apache.org/docs/2.2/mod/core.html#options