Q: phusion passenger, apache2 only works with www 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
  ServerName example.com
ServerAlias  www.example.com
DocumentRoot /home/example/public_html/beta/tdt3/public
ServerAdmin webmaster@example.com
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/example.com combined
CustomLog /usr/local/apache/domlogs/example.com-bytes_log "%{%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
</IfModule>
ScriptAlias /cgi-bin/ /home/example/public_html/beta/tdt3/public/cgi-bin/

The trouble is if I do http://example.com it redirects to http://www.example.com/beta/tdt3/public
If I use http://www.example.com 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?

A: It was a rewrite rule in the .htaccess.  duh
