我已经在我自己的服务器上安装了ojs 。 在安装过程中,需要创build一个可由php(apache = www-data)写入的文件夹,但不能从浏览器访问。 该文件夹用于保存上传的稿件,这些稿件不得为公众所见,但必须由软件自己阅读。 我改变了httpd.conf文件来拒绝文件夹中的文件列表,但问题似乎并没有完全解决。 实际上,尽pipe文件名是随机的,但如果恶意或者好奇的用户具有原稿的确切文件名,则他/她可以下载文件。 请注意,现在在我的服务器(Ubuntu 12.04.4)中有很多这样的手稿。 有什么办法可以拒绝他们的下载(至less对于没有注册为编辑的未经授权的用户)?
自述文件告诉你该怎么做。 相关部分:
* Install OJS so that the files directory is NOT a subdirectory of the OJS installation and cannot be accessed directly via the web server. 3. Create a directory to store uploaded files (submission files, etc.) and make this directory writeable. It is recommended that this directory be placed in a non-web-accessible location (or otherwise protected from direct access, such as via .htaccess rules).
这意味着您用于上传的文件目录不应位于DocumentRoot 。 当然,如果你已经完成了安装,你必须在config.inc.php指定它的位置。
[files] ; Complete path to directory to store uploaded files ; (This directory should not be directly web-accessible) ; Windows users should use forward slashes files_dir = files