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.

Hello i need help on how to edit httpd.conf file.

Discussion in 'General Discussion' started by 50r, Oct 11, 2012.

  1. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    I have a scrip that has a function that needs me to edit the httpd.conf file but believe me i have harvest this forum and the internet for any help on how to go about this but i cant find the right way that i understand please help thanks.
     
  2. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    bump guys any help please?
    ?
    ?
     
  3. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Twitter:
    Do you need help on how to edit the httpd.conf file ?
    There are some threads -- search google for [edit httpd.conf file site:forums.cpanel.net]
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,776
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    beleave me i searched almost all the posts on the editing httpd.conf but i did not even get one talking of the way to find it.
    @cPanelMichael i will try to read this guide may be i will get there.
     
  6. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator

    Am not much good at all the term used here maybe i can post what i want to edit and one of you guys might just give me the direct way to go about this.

    this is what i need to do.


    Note: These instructions refer to Apache webserver.

    Add the following line to httpd.conf VirtualHosts section for your domain:

    ServerAlias www.yourdomainname.com yourdomainname.com *.yourdomainname.com

    Again, if you are on a shared hosting and don't have access to httpd.conf file, and no means in your control panel to edit your VirtualHosts section, then you must ask help from your hosting support.
     
    #6 50r, Oct 12, 2012
    Last edited: Oct 12, 2012
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are you trying to add a wildcard domain to your main domain as a parked domain? If so, you could instead go to /var/cpanel/userdata/username/domain.com file (or sub.domain.com if it's a subdomain) and add the *.yourdomainname.com entry into the serveralias line in the file. Of note, username is your cPanel username, and domain.com is your domain name.

    You'd also want to add *.yourdomain.com into /var/cpanel/userdata/username/main file for the parked domains section or addon domain section (whichever this one happens to be).

    After adding the details, you'd run the following:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak121012
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    Thanks!
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are you trying to add a wildcard domain to your main domain as a parked domain? If so, you could instead go to /var/cpanel/userdata/username/domain.com file (or sub.domain.com if it's a subdomain) and add the *.yourdomainname.com entry into the serveralias line in the file. Of note, username is your cPanel username, and domain.com is your domain name.

    You'd also want to add *.yourdomain.com into /var/cpanel/userdata/username/main file for the parked domains section or addon domain section (whichever this one happens to be).

    After adding the details, you'd run the following:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak121012
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    Thanks!
     
  9. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    the problem is i dont know how to get access to any of those files mention above and also dont know how to run the command given above.

    the developer of the script wont replay my tickets i guess i am failing on this.
    can you please start by showing me how to gain access to the files that i have to edit?
     
  10. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Twitter:
    Do you have a vps/dedicated server ? Do you have root access ?

    - - - Updated - - -

    Do you have a vps/dedicated server ? Do you have root access ?
     
  11. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    Yes i do i just purchased a virtual server hosting from arvixe andits said i have root acces which i dont know how to access.
     
  12. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    any help is appreciated help please
     
  13. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    I think i have to give up on this one its been 4days ever since i got some response
    please help guys.
     
  14. IVPS - Peter

    IVPS - Peter Member

    Joined:
    Oct 18, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    If you have root access, use PuTTY to login as root on the server to make the adjustments
     
  15. 50r

    50r Member

    Joined:
    Oct 9, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Vryheid, KwaZulu-Natal, South Africa
    cPanel Access Level:
    Root Administrator
    what is putty?
     
  16. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Sorry, the day you'd asked for help, we were having issues replying on the forums. After that, I was off shift and didn't see the replies.

    Which operating system do you use? If you use Windows, you can get a copy of putty at this location:

    http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

    After you've grabbed a copy of the program, then for the host enter the server's IP or hostname (the full hostname such as server.domain.com). For the username on the connection, enter root, then enter the root password when prompted.
     
Loading...

Share This Page