What should my open_basedir path be set as?

869 views Asked by At

I have a website, built using a multisite WordPress set-up.

I've come across the following advice online:

It is better to enforce a base directory (eg: "/var/www/") to prevent PHP from accessing other directories in the filesystem.

What should I set my path to?

  1. home/mysite/
  2. home/mysite/public_html
  3. home/mysite/public_html/something-else

Edit: For more accurate context, I'm configuring open_basedir via WHM to manage more than one website on a VPS.

1

There are 1 answers

1
UnskilledFreak On BEST ANSWER

DOCUMENT_ROOT should always be open_basedir.

Is your wp installed in this dir? If so, wp automatically read the right dir in multisite mode from that, so your open_base_dir should be your document_root