Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    21

    Default Disable ServerAdmin Email in http.conf

    Whenever an error is generated while running a Perl script, it says:
    Code:
    "For help, please send mail to the webmaster (webmaster@somedomain.com), 
    giving this error message and the time and date of the error."
    Well, this email is no longer valid because of spammers. I see the email as Server Admin for each virtual domain in http.conf. I also see it in the template at /var/cpanel/templates/apache2/vhost.default. Can I somehow comment out the:
    Code:
    webmaster@somedomain.com
    Or, is there some other way to disable it or change it. I really don't understand why this hasn't been disabled already.

    Ideas Anyone?
    Thanks!
    CentOS release 4.7 (Final)

  2. #2
    Member apscinsspl's Avatar
    Join Date
    Mar 2008
    Posts
    112

    Default

    Hello,

    The script used for this by cpanel is:

    /usr/local/cpanel/bin/wwwacct

    but you cant edit this script as it is encrypted.

    In this case I would suggest you another solution for your existing domains.

    do as follows:

    =======================================================
    cd /etc/httpd/conf
    cat httpd.conf |grep -v "ServerAdmin webmaster@" > httpd.conf.new
    mv httpd.conf httpd.conf.orig
    mv httpd.conf.new httpd.conf
    service httpd restart
    =======================================================

    What does the above commands do:

    The above set of commands will create a exact copy of httpd.conf file by name httpd.conf.new but excluding the line starting as "ServerAdmin webmaster@".

    Then it will rename the old httpd.conf to httpd.conf.orig
    and newly created httpd.conf.new to httpd.conf
    (This will replace your httpd.conf with new)
    Then it will restart the httpd service to reflect the changes and you are done

  3. #3
    Member
    Join Date
    Feb 2007
    Posts
    21

    Default

    Thank you very much for your help apscinsspl. It worked fine. Only problem is that it now displays the contact email for that account, and I always set contact email as my email when I set up an account. I don't want that one to display because I have several domain/reseller accounts. I restored the original.

    I see there is a conditional in /var/cpanel/templates/apache2/vhost.default and /var/cpanel/templates/apache2/ssl_vhost.default that appears to determine which email to display. I'm wondering if I can comment out that conditional without any consequences, since I really don't understand it anyway, and maybe it's used for other purposes with cpanel notification.

    Here is the conditional statement:

    Code:
    [% IF vhost.serveradmin -%]
        ServerAdmin [% vhost.serveradmin %]
    [% ELSE %]
        ServerAdmin webmaster@[% vhost.servername %]
    [% END -%]
    What do you think?
    Thanks again for your assistance.

Similar Threads & Tags
Similar threads

  1. Where do I change Apache ServerAdmin email address in httpd.conf?
    By outofcontrol in forum E-mail Discussions
    Replies: 6
    Last Post: 05-18-2009, 12:13 PM
  2. http conf error?
    By NocTurNalFX in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 06-19-2005, 12:43 PM
  3. Can you help me to disable http ssl?
    By xxgchappy in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-18-2004, 10:59 PM
  4. about CGI http.conf
    By typer in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-02-2004, 12:09 AM
  5. Modifying Apache conf Main ServerAdmin
    By drmueyx in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-20-2003, 03:20 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube