close

因工作需要必須取消Synology 系統保留目錄 blog 。

系統為DSM 4.0 。

Step 1. vi usr/syno/etc/sites-enabled-user/SYNO.SDS.PhotoStation.conf

Step 2. 會看到以下畫面,請且把有blog的別名與導向用#字號取消

<IfDefine HAVE_PHP>
AliasMatch ^/photo$ "/var/packages/PhotoStation/target/photo/"
Alias /photo/ "/var/packages/PhotoStation/target/photo/"
Alias /photosrc/ "/var/services/photo/"
# AliasMatch ^/blog$ "/var/packages/PhotoStation/target/photo/blog/"
# Alias /blog/ "/var/packages/PhotoStation/target/photo/blog/"
# RedirectMatch ^/blog/include/v(.*) /photo/get_video.php?$1
AliasMatch ^/~([^\/]*)/photo$ "/var/packages/PhotoStation/target/photo/"
AliasMatch ^/~([^\/]*)/photo/(.*) "/var/packages/PhotoStation/target/photo/$2"
# AliasMatch ^/~([^\/]*)/blog$ "/var/packages/PhotoStation/target/photo/blog/"
# AliasMatch ^/~([^\/]*)/blog/(.*) "/var/packages/PhotoStation/target/photo/blog/$2"
# RedirectMatch ^/~([^\/]*)/blog/include/v(.*) /~$1/photo/get_video.php?$2

<Directory "/var/packages/PhotoStation/target/photo">
php_admin_value open_basedir none
</Directory>
</IfDefine>
<IfDefine !HAVE_PHP>
AliasMatch ^/photo$ "/usr/syno/synoman/empty/photo/"
Alias /photo/ "/usr/syno/synoman/empty/photo/"
Alias /photosrc/ "/var/services/photo/"
# AliasMatch ^/blog$ "/usr/syno/synoman/empty/blog/"
# Alias /blog/ "/usr/syno/synoman/empty/blog/"
# RedirectMatch ^/blog/include/v(.*) /photo/get_video.php?$1
AliasMatch ^/~([^\/]*)/photo$ "/usr/syno/synoman/empty/photo/"
AliasMatch ^/~([^\/]*)/photo/(.*) "/usr/syno/synoman/empty/photo/$2"
# AliasMatch ^/~([^\/]*)/blog$ "/usr/syno/synoman/empty/blog/"
# AliasMatch ^/~([^\/]*)/blog/(.*) "/usr/syno/synoman/empty/blog/$2"
# RedirectMatch ^/~([^\/]*)/blog/include/v(.*) /~$1/photo/get_video.php?$2
</IfDefine>

Step 3.重新啟動 Apache 即可。

/usr/syno/etc/rc.d/S97apache-user.sh restart

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 npulove 的頭像
    npulove

    學無止盡.....

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