开发者

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

  1. Allow FollowSymLinks (apache) configuration
  2. Allow proper permission on folder and files to web server (apache)
  3. make sure that path fall under "script handler's" allowed path (php.ini => open_basedir)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜