Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
+ Reply to Thread
Results 1 to 5 of 5

This is a discussion on How to edit httpd.conf in the VPS & Dedicated forum
Hello, I need a little help editing my httpd.conf in Apache. This is what I need to add (it's an example, I need to change ...

  1. #1
    JPC Member
    Join Date
    Jun 2009
    Posts
    13

    How to edit httpd.conf

    Hello, I need a little help editing my httpd.conf in Apache.

    This is what I need to add (it's an example, I need to change the domain name and directory):

    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerAdmin webmaster@example.com
    DocumentRoot /var/www/html
    ServerName example.com
    ServerAlias *.example.com

    <Directory "/var/www/html">
    AllowOverride All
    </Directory>
    </VirtualHost>


    How do I edit this? What I have so far is:

    I need to SSH into my main IP address (the IP where the WHM is) and type su root *rootpassword*

    I tried that and this is what I got: -bash: /bin/su: Permisison denied

    What am I doing wrong?

    Thank you!

  2. #2
    JPC Dream Team
    Join Date
    Mar 2009
    Posts
    764
    Have you added the user from which you're trying to su in the wheel group? If no, you can add it from WHM >> Manage Wheel Group Users.

    Once you logged in as root, You can find the apache conf in /usr/local/apache/conf/httpd.conf.

    If you need any assistance on this, please open a ticket with the root password.
    Anoop
    Support Department
    JaguarPC.com

  3. #3
    /dev/null JPC-Zishan's Avatar
    Join Date
    Apr 2008
    Posts
    257
    Which control panel you have? The path of httpd.conf may differ according to control panel. In cPanel, you will find it in /usr/local/apache/conf and most of the other control panels, you will find it in /etc/httpd/conf/ directory.

    In cPanel, changes made to httpd.conf will not be preserved as httpd.conf is no longer being used as data store. It is rebuilt based on the information stored at /var/cpanel/userdata.
    Zishan - L3 - Shift Lead | JaguarPC

    Helpful Links
    Knowledge Base | Network Status | Current Specials

  4. #4
    JPC Member
    Join Date
    Jun 2009
    Posts
    13
    Thanks.

    I added my user to the wheel group.

    I am in fact using cPanel, so what you are saying is that any changes I make to httpd.conf won't have any affect, and that I have to make the changes to /var/cpanel/userdata instead?

  5. #5
    /dev/null JPC-Zishan's Avatar
    Join Date
    Apr 2008
    Posts
    257
    Quote Originally Posted by rebaths View Post
    I am in fact using cPanel, so what you are saying is that any changes I make to httpd.conf won't have any affect, and that I have to make the changes to /var/cpanel/userdata instead?
    Exactly. You will need to make changes in respective /var/cpanel/userdata/USER/DOMAIN.COM file and then rebuild httpd.conf as:

    /usr/local/cpanel/bin/build_apache_conf

    If it doesn't show any error and shows httpd.conf built OK message then restart Apache afterwards:

    /scripts/restartsrv httpd
    Zishan - L3 - Shift Lead | JaguarPC

    Helpful Links
    Knowledge Base | Network Status | Current Specials

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts