Using symbolic link inside web server root
Can I create one folder inside my web server root and then create one symbolic link(soft link) for that folder anywhere in disk so that whenever I refer this folder in my pages ,server will actuaaly look for files in disk.Is it a violation of web server security ? Please suggest if it is possible to achieve the same dif开发者_如何学Pythonferently.
This depends on webserver and configuration. In Apache, for example, you can control if symlinks are allowed with the FollowSymLinks configuration option.
More on http://httpd.apache.org/docs/2.0/mod/core.html
As per server security it is not recommended, but you can configure your web server for this. steps are given below
- Allow FollowSymLinks (apache) configuration
- Allow proper permission on folder and files to web server (apache)
- make sure that path fall under "script handler's" allowed path (php.ini => open_basedir)
精彩评论