The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Advanced Vi help: line addition to httpd.conf

Discussion in 'General Discussion' started by SubZero, Nov 29, 2005.

  1. SubZero

    SubZero Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Balmumcu, Istanbul, TR
    I want to add:
    Code:
    php_admin_value sendmail_path "sendmail -t -i -fUSER@servers.hostname.dom"
    to my httpd.conf for every vhost between <ifmodule mod_php4.c>...</ifmodule> and <ifmodule mod_php5.c>...</ifmodule> sections where the USER is to be rerieved from the "User vhost1" line of the httpd.conf and put that line seen above beween the <ifmodule mod_php4 ... </ifmodule> things for me as a new line... My sample httpd.conf vhost is like this:
    Code:
    <VirtualHost ip.add.re.ss>
    ServerAlias vhost1.com
    ServerAdmin webmaster@vhost1.com
    DocumentRoot /home/vhost1/public_html
    BytesLog domlogs/vhost1.com-bytes_log
    ServerName www.vhost1.com
    <IfModule mod_php4.c>
      php_admin_value open_basedir "/home/vhost1:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule mod_php5.c>
      php_admin_value open_basedir "/home/vhost1:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    User vhost1
    Group vhost1
    CustomLog /usr/local/apache/domlogs/vhost1.com combined
    Options -ExecCGI -Includes
    </VirtualHost>
    I just don't know to do this in vi. Can anyone help me?
     
    #1 SubZero, Nov 29, 2005
    Last edited: Nov 29, 2005
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Can't you just make that amendment in /usr/local/lib/php.ini?
     
Loading...

Share This Page