Disable directory listing in OpenCPU

帅比萌擦擦* 提交于 2019-12-12 03:45:19

问题


I have been trying to disable directory listing in OpenCPU so our users cannot see the resulting directories and files in the http://server/ocpu/tmp/ directory.

I have followed Apache's Directory Listing Configuration and deleted every mention of Indexes in the conf files in /etc/apache2/ and included Options -Indexes in the sites-enabled/opencpu.conf file (in the Location tags) without success.

I also looked at the rApache documention without finding any pertinent entry.

Does anyone know any documentation or configuration to achieve this?


回答1:


The directory listing is done dynamically by R code so Apache configs won't help here.

If you run the OpenCPU cloud server under Ubuntu directory listing of /ocpu/tmp is disabled by default via the apparmor configurations. Try it:

https://cloud.opencpu.org/ocpu/tmp/

This only works if your platform supports AppArmor, so it doesn't work for CentOS or Docker. Therefore Ubuntu deployment is recommended for production.



来源:https://stackoverflow.com/questions/44761864/disable-directory-listing-in-opencpu

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