1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Local PHP Safe Mode in httpd.include or vhost.conf?

Discussion in 'Plesk for Linux - 8.x and Older' started by drc15, Feb 19, 2007.

  1. drc15

    drc15 Guest

    0
     
    Hi,

    I have a vhost setup in which there are 2 files in my conf folder of my virtual host: httpd.include and vhost.conf

    I need to make sure my PHP safe mode local is set to 'Off' in the httpd.include file, but when I edit this file the header of the file tells me not to edit the file but put my settings in the vhost.conf file.

    I already have some basic settings in my vhosts.conf file, but how do I put the following sections,

    <IfModule sapi_apache2.c>
    php_admin_flag engine on
    php_admin_flag safe_mode off
    php_admin_value open_basedir "xxxx"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_flag engine on
    php_admin_flag safe_mode off
    php_admin_value open_basedir "xxxx"
    </IfModule>

    in the vhosts.conf file when those sections above are between <Directory> tags and my include vhosts.conf line is outside these <Directory? tags?

    The problem I am finding is because I am on a virtual server box from 1&1 I am finding that the settings in the httpd.include file get changed, so I need to make sure they don't by setting the details in the vhosts.conf file.

    Thanks

    Daniel
     
  2. poke

    poke Guest

    0
     
    Sorry if I misunderstand, but the lines needs to go inside the <Directory> tags.

    Don't forget to restart apache after you make the change to the vhost.conf file.
     
  3. drc15

    drc15 Guest

    0
     
    So are you saying that I can dump most of the http.include file contents into the vhosts.conf file, and all will still be ok?

    Such as putting everything between the <Directory> tags into my vhosts.conf file?

    Dan
     
  4. poke

    poke Guest

    0
     
    Yes..

    The relevant contents anyway.
     
  5. kuhle

    kuhle Guest

    0
     
    i have a customer asking us to turn off PHP safe mode for their domain. Is this possible for a single domain?

    Their problem is that when they upload files, the permissions prevent files from being accessed and amended. We had to set all files with permission 744, but any new files are still being given a different default that they wish to amend.

    If you can give me some instructions of how to achieve this as well, I would be most grateful.
     
  6. poke

    poke Guest

    0
     
    For safemode you can do this via Plesk.

    Login to plesk, click on the domain you need to turn safemode off on and then click on "setup" under "hosting"... Now you will see a checkbox next to "PHP Support", uncheck it to turn safe mode off and restart apache.... All done :)
     
  7. kuhle

    kuhle Guest

    0
     
    THANK YOU, Poke, very much.
     
Loading...