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.

How can I edit httpd.conf

Discussion in 'General Discussion' started by matins007, Jan 19, 2009.

  1. matins007

    matins007 Member

    Joined:
    Jan 15, 2009
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I would like to know how to acces and edit the httpd.conf file.

    Thank you.
     
  2. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    You cannot directly edit httpd.conf file as it will be overwritten on any cPanel update or account level modification. You can check the link below for httpd.conf customization.

    http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html

    For a minor change like changing VirtualHost IP for a domain/subdomain, do this.

    1- edit the file /var/cpanel/userdata/username/domain.com
    2- Rebuild httpd.conf by running command

    /usr/local/cpanel/bin/build_apache_conf

    3- Restart httpd service.
     
  3. justthisguy

    justthisguy Registered

    Joined:
    Jul 7, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    You may find you don't need to. In fact, you can (now) do much from right in WHM if you want.

    If you check out (at least on WHM version 11.24.2 it's there), under:


    whm : service configuration : global configuration

    You can edit the most obvious things you'd want to change in the httpd.conf file



    and under:

    whm : service configuration : include editor

    You can basically just do a free-form insert which gets placed into httpd.conf.


    Do not just edit the httpd.conf file yourself (unless you want a very temporary change, and want it overwritten:)

    All of this said, I do hate when people don't actually answer the original question, so: You'll (typically) find the file at /usr/local/apache/conf/httpd.conf.

    If you do chose to edit this yourself (like by typing "vi /usr/local/apache/conf/httpd.conf"), may I suggest that you first make a backup copy of the file (like "cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd_original.conf").
     
Loading...

Share This Page