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

50r

Member
Oct 9, 2012
17
0
1
Vryheid, KwaZulu-Natal, South Africa
cPanel Access Level
Root Administrator
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]
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.
 

50r

Member
Oct 9, 2012
17
0
1
Vryheid, KwaZulu-Natal, South Africa
cPanel Access Level
Root Administrator
Hello :)

The following document describes the process of editing your Apache configuration file:

Custom Directives to httpd.conf

Thank you.

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.
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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!
 

50r

Member
Oct 9, 2012
17
0
1
Vryheid, KwaZulu-Natal, South Africa
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!
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?
 

50r

Member
Oct 9, 2012
17
0
1
Vryheid, KwaZulu-Natal, South Africa
cPanel Access Level
Root Administrator
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 ?
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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.