假設 a.example.com 的 DocumentRoot 在 /var/www//html/a

但當使用者連線到
http://a.example.com/test/  時
希望看到的是 /var/www/html/test 下的檔案

方法1
於 /var/www/html/a 下,建立一個 symbolic link 指到 ../test
# ln -s ../test test

方法2
於 a.example.com 的設定檔下,新增以下幾行
        <Directory "/var/www/html/test ">
            Options -Indexes +FollowSymLinks +Includes
            AllowOverride All
            Require all granted
        </Directory>

        Alias   /test /var/www/html/test 
 

arrow
arrow
    文章標籤
    apache vhost
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()