سؤال

I am trying to simulate shared hosting on my local server by blocking off the root directory.

I've tried:

<Directory "C:/xampp/htdocs/root">
Options -Indexes
</Directory>

in httpd.conf (restarted Apache)

and

Options -Indexes

in the .htaccess of htdocs.

What do I need to do to restrict opendir from accessing beyond this folder?

هل كانت مفيدة؟

المحلول

You need to use open_basedir in the config file

open_basedir - how to set for specific directory

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top