Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

open_basedir and symlink problem

I am running into a problem where I can't allow access to a symlink directory in my vhost_ssl.conf file. For some reason PHP (or maybe it's apache) isn't recognizing the symlink path.

/var/www/vhosts/site/ is the real path
/home/httpd/vhosts/site/ would be the path with a symlink (/home/httpd/vhosts -> /var/www/vhosts)

I need to get this to work somehow for a backup server. The primary server doesn't use symlinks while the backup does.

Now the line in the vhost_ssl.conf is as follows:

DocumentRoot /home/httpd/vhosts/site/httpsdocs
<Directory /home/httpd/vhosts/site/httpsdocs>
      <IfModule sapi_apache2.c>
            php_admin_flag engine on
            php_admin_value open_basedir "/var/www/vhosts/site/extraDir:/home/httpd/vhosts/site/httpsdocs:/tmp:/home/httpd/vhosts/site/extraDir2:/home/httpd/vhosts/site/extraDir"
      Options +Includes +ExecCGI
<Directory /var/www/vhosts/site/httpsdocs>
      php_admin_flag engine on
      php_admin_value open_basedir "/var/www/vhosts/site/httpsdocs:/tmp:/home/httpd/vhosts/site/extraDir2:/var/www/vhosts/site/extraDir;/home/httpd/vhosts/site/extraDir/:/home/httpd/vhosts/site/extraDir2"
      Options +Includes +ExecCGI
1 Solution
Try Adding
to the Option List in both <Directory> sections

Options +Includes +ExecCGI +FollowSymLinks

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now