Create an Alias Directory inside a Virtual Host

岁酱吖の 提交于 2019-12-04 00:23:05

Note, if you are creating an Alias to a directory outside of your DocumentRoot, you may need to explicitly permit access to target directory:

<VirtualHost *:80>
    ServerName apps.ptrl
    DocumentRoot "C:/Wamp/vhosts/ptrl/apps"
    ErrorLog "logs/apps-ptrl-error.log"
    CustomLog "logs/apps-ptrl-access.log" common

    # Puts here, before Directory directive :) 
    Alias /blog "C:/Wamp/vhosts/ptrl/praveen-kumar/blog"

    <Directory "C:/Wamp/vhosts/ptrl/apps">        
        allow from all
        order allow,deny
        AllowOverride All
    </Directory>
</VirtualHost>

Note, too, that URL-path (first Alias part) is case-sensitive even on case-insensitive file systems.

Also, check permissions from C:/Wamp/vhosts/ptrl/praveen-kumar/blog directory.

Reference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!