Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have apache 2, phusion passenger. This is on cpanel. I followed the directions to change the documentroot and have the changes stick. Here is some of the pertinent httpd.conf

DocumentRoot /home/example/public_html/beta/tdt3/public
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/ combined
CustomLog /usr/local/apache/domlogs/ "%{%s}t %I .\n%{%s}t %O ."
## User example # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled example
<IfModule !mod_disable_suexec.c>
    SuexecUserGroup example example
ScriptAlias /cgi-bin/ /home/example/public_html/beta/tdt3/public/cgi-bin/

The trouble is if I do it redirects to If I use it works fine. I dont know if this is a passenger deal, an apache deal or a cpanel deal. Anyone know why the non www redirects like that?

share|improve this question
Is this within the virtualhost directive or not? – Rilindo Jul 9 '11 at 19:22
yes within the virtualhost directive – hforbess Jul 11 '11 at 14:02
up vote 0 down vote accepted

It was a rewrite rule in the .htaccess. duh

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.