I tried that.  I'm including the actual config file in sites-available if
it helps.

<VirtualHost *:80>
ServerAdmin webmaster@localhost
 ServerName morebearsmore.com
        ServerAlias www.morebearsmore.com

DocumentRoot /var/www/morebearsmore.com/public_html
<Directory />
 Options FollowSymLinks
AllowOverride None
</Directory>
 <Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
 Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
 AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
 Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>



On Thu, Jan 30, 2014 at 10:26 AM, Otis DeWitt <[email protected]> wrote:

> Try creating a server alias and restart apache.
>
> <VirtualHost 192.168.1.1 172.20.30.40>
>     DocumentRoot /www/server1
>
> ServerName example.com
>     ServerAlias www.example.com</VirtualHost>
>
>
> Sent from my iPhone
>
> On Jan 30, 2014, at 1:04 PM, Josh Stratton <[email protected]>
> wrote:
>
> I setup an apache server a while back without a virtualhost and got
> everything working fine.  I added a virtualhost for my wife and it seems to
> work fine on desktops, but on our phones (an iphone and a windows phone),
> both redirect to my root site if the user adds www to the domain in the
> address bar.  I assume it's just some mistake in my virtualhost setup, but
> I don't understand why it works on desktop but not mobile.  I added a
> ServerAlias to include the www prefix onto the domain and restarted apache,
> but it doesn't seem to make a difference.  I always get the "root" (hope
> I'm using the right naming convention) host back.
>
>

Reply via email to