Results 1 to 3 of 3

Thread: PHP open_basedir custom template path

  1. #1
    Member Danik's Avatar
    Join Date
    Aug 2004
    Posts
    7

    Question PHP open_basedir custom template path

    I need to add custom folder that will be excluded from openbase_dir restriction to all users

    1 I've edited /var/cpanel/templates/apache2/vhost.default and added my custom folder path
    2 I've rebuilded apache conf with /scripts/rebuildhttpdconf and in httpd.conf custom path was added ok
    3 I've restarted apache /scripts/restartsrv_apache and all works great

    But have found that after editing list trough WHM >> Main >> Security Center >> PHP open_basedir Tweak all
    WHM do not take my edited template from /var/cpanel/templates/apache2/vhost.default and builds vhosts without taking my changes and It does rebuild all vhosts after any changes in WHM

    To resolve this I should run /scripts/rebuildhttpdconf and /scripts/restartsrv_apache

    Is there any other template file, what I need to edit to resolve this issue?

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: PHP open_basedir custom template path

    First of all, /var/cpanel/templates/apache2/vhost.default should not be edited directly. That file will be wiped on cPanel forced updates. Instead, you would need to copy it to vhost.local and edit vhost.local instead:

    Code:
    cp /var/cpanel/templates/apache2/vhost.default /var/cpanel/templates/apache2/vhost.local
    Next, the template files used for new account creations are at /usr/local/cpanel/etc/httptemplates/apache2_2/ location where default is the http template (port 80) and ssldefault is the https template (port 443). If you edit the default file to make changes, you will need to put that file in the exclude list for cPanel updates:

    Code:
    echo "/usr/local/cpanel/etc/httptemplates/apache2_2/default" >> /etc/cpanelsync.exclude
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Member Danik's Avatar
    Join Date
    Aug 2004
    Posts
    7

    Red face Re: PHP open_basedir custom template path

    Thank you. It was useful.

Similar Threads

  1. Update DNS zones with custom zone template
    By fineline in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 06-24-2009, 01:34 PM
  2. Create account with custom vhost template
    By JamieD in forum cPanel & WHM Discussions
    Replies: 8
    Last Post: 01-15-2009, 09:15 AM
  3. Custom open_basedir value
    By anton_latvia in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 02-15-2007, 02:11 AM
  4. Custom /home/ Path
    By erikcw in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 08-31-2005, 11:26 AM