#1 (permalink)  
Old 08-20-2008, 10:59 AM
Registered User
 
Join Date: Nov 2003
Posts: 60
trevHCS is on a distinguished road
Using www. in ServerName - httpd.conf ?

Is there any way to get WHM to edit the httpd.conf file and swap the ServerName and ServerAlias lines around as it seems to have changed this at some point...?

For example, in the httpd.conf it currently uses:

ServerName example.com
ServerAlias www.example.com

...which means if you call on $_SERVER['HTTP_HOST'] or $_SERVER['SERVER_NAME'] in PHP you get the non-www one.


On older accounts these tend to appear as below, and on some they even appear with both in the alias line.

ServerName www.example.com
ServerAlias example.com


If it's fixed in then I'm sure I'll work around it - no great problems. But thought I'd ask.

Trev
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-20-2008, 12:22 PM
rkm11's Avatar
Registered User
 
Join Date: May 2007
Posts: 31
rkm11 is on a distinguished road
In WHM when you list accounts, what do those domains show up as (www.domain.com or domain.com)

Check your /var/cpanel/templates/apache2/main.default and see what ServerName and ServerAlias is set to.

Maybe try to rebuild your httpd.conf?

Run:
/usr/local/cpanel/bin/build_apache_conf

Last edited by rkm11; 08-20-2008 at 12:24 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:37 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc