Results 1 to 7 of 7

Thread: Adding a directory visible to php

  1. #1

    Angry Adding a directory visible to php

    Hello,

    I am almost an newbie in apache php configuration, and I need to add a directory visible to php but outside of web access on one site.

    I have created a /var/www/vhosts/mydomain/conf/vhost.conf file with the following content :

    <Directory /var/www/vhosts/mydomain/httpdocs/>
    php_admin_value open_basedir "/var/www/vhosts/mydomain/httpdocs:/var/www/vhosts/mydomain/core"
    </Directory>
    I can't access the core content from the php even with 777 on the core directory.

    Can you help ?

    Thanks

    Phil



  2. #2

    Default

    Does your custom open_basedir path show up when you check the output of phpinfo()? Did you run websrvmng to make sure that your vhost.conf actually gets included?

    See the documentation for more information: Including Directives into Web Server Configuration File
    Parallels Certified Automation Professional | Parallels Product Expert | Lemonbit Internet | lemonbit.com



  3. #3

    Default

    Note that the Plesk Migration Manager will not migrate that custom directory, so your app would not get migrated completely if you ever wanted to migrate using PMM. It might be a good idea to just put all your files under httpdocs and protect the directories that you don't want to serve to the public via a Deny statement in either a .htaccess file or vhost.conf.
    Parallels Certified Automation Professional | Parallels Product Expert | Lemonbit Internet | lemonbit.com



  4. #4

    Default

    Thanks for your help,

    As I said in my post, I HAVE to have the conf directory one level up the httpdocs, and more it will have to be accessible from both http and https...

    But first thing first !
    Let's start with http

    I have done the vhost as previously mentionned, I have done both :
    /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=my-domain.com
    /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=my-domain.com

    I may be wrong in my approach, but basically what I have to achieve is to php access (read/write) directories that are on the same level as httpdocs an hhpsdocs....


    and here is the phpinfo() in an attached file, you will see no mention ofthe core directory

    Philippe
    Attached Files Attached Files
    Last edited by Fildefer57; Nov 22, 2011 at 04:33 AM.



  5. #5

    Default

    please note that I made a mistake in my hush work on domain name sometime I put mydomain, sometime my-domain, it is just a post processing man error, everything is coherent in the real site. ;-)



  6. #6

    Default

    Let's start at the beginning. Did websrvmng add an Include statement for the vhost.conf in /var/www/vhosts/mydomain/conf/httpd.include?
    Parallels Certified Automation Professional | Parallels Product Expert | Lemonbit Internet | lemonbit.com



  7. #7

    Default

    I have absolutly no idea how to know that !

    What I know is that vhost.conf and vhost_ssl.conf does change things...

    I finally manage to have read and write access to the directories with the following directives :

    AddHandler fcgid-script .php
    SuexecUserGroup arrive psacln
    <Directory /var/www/vhosts/my-domain.com/httpsdocs>
    FCGIWrapper /var/www/vhosts/my-domain.com/bin/php-cgi .php
    Options +ExecCGI +FollowSymLinks +Includes
    allow from all
    </Directory>
    <Directory /var/www/vhosts/my-domain.com/core>
    FCGIWrapper /var/www/vhosts/my-domain.com/bin/php-cgi .php
    Options +ExecCGI +FollowSymLinks +Includes
    allow from all
    </Directory>
    The problem I have now is that I have a warning the php shells can't include files in the core directory
    As I said, I am not an expert in apache/php configuration...

    Thanks for your help.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •