open_basedir and symlink problem

Posted on 2006-04-04
Last Modified: 2012-06-21
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
Question by:Shroder
    1 Comment
    LVL 43

    Accepted Solution

    Try Adding
    to the Option List in both <Directory> sections

    Options +Includes +ExecCGI +FollowSymLinks

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now