Thanks, that worked.

On Sun, Apr 7, 2013 at 6:45 AM, Zé Loff <zel...@zeloff.org> wrote:

> On Sat, Apr 06, 2013 at 08:55:53PM +1100, John Tate wrote:
> > Removed all the NameVirtualHost lines and it still isn't working. I can't
> > make sense of it everything looks fine, I get some errors about _default_
> > VirtualHost.
> >
> > # apachectl startssl
> > [Sat Apr  6 02:53:57 2013] [warn] module mod_php5.c is already added,
> > skipping
> > [Sat Apr  6 02:53:57 2013] [warn] module php5_module is already loaded,
> > skipping
> > [Sat Apr  6 02:53:57 2013] [warn] _default_ VirtualHost overlap on port
> 80,
> > the first has precedence
> > [Sat Apr  6 02:53:57 2013] [warn] _default_ VirtualHost overlap on port
> 80,
> > the first has precedence
> >
> >
> >
> > On Fri, Apr 5, 2013 at 7:25 PM, Stuart Henderson <s...@spacehopper.org
> >wrote:
> >
> > > On 2013-04-05, John Tate <j...@johntate.org> wrote:
> > > > NameVirtualHost 127.0.0.1:443
> > > > NameVirtualHost 208.79.92.130:443
> > > > NameVirtualHost 127.0.0.1:80
> > > > NameVirtualHost 127.0.0.1:80
> > > > NameVirtualHost 127.0.0.1:80
> > > > NameVirtualHost 208.79.92.130:80
> > > > NameVirtualHost 208.79.92.130:80
> > > > NameVirtualHost 208.79.92.130:80
> > >
> > > remove the duplicate lines and see if it helps.
> > >
> > >
> >
> >
> > --
> > www.johntate.org
> >
>
> Apache is telling you what is wrong. You have several default VHs, and
> the first (for port 80 it's johntate.org) has precedence, so that's why
> you always get redirected to it.
>
> Try changing the NameVirtualHost directives to *:80 and *:443. You are
> specifying IP addresses on those directives, but then define
> virtual hosts on *:80 and *:443, and maybe that's the problem (I've
> moved from apache to nginx, so I'm not testing any of this...). Here's
> a (very trimmed) known-to-work config:
>
> ServerName www.phistat.com
> DocumentRoot "/var/www/htdocs"
> UseCanonicalName On
>
> NameVirtualHost *:80
> NameVirtualHost *:443
>
> <VirtualHost *:80>
>         ServerAdmin         webmas...@zeloff.org
>         DocumentRoot        /var/www/htdocs
>         ServerName          www.zeloff.org
>         ErrorLog            logs/error_log
>         CustomLog           logs/access_log combined
>         <Directory "/var/www/htdocs/fdm">
>                 Options             Multiviews
>                 FollowSymLinks
>                 AllowOverride       None
>                 Order
>       allow,deny
>                 Allow from                                      all
>         </Directory>
> </VirtualHost>
>
> <VirtualHost *:80>
>         ServerAdmin
> webmas...@phistat.com
>         DocumentRoot                            /var/www/htdocs/phiStat
>         ServerName                                      www.phistat.com
>         ErrorLog
>  logs/www.phistat.com-error_log
>         CustomLog
> logs/www.phistat.com-access_log combined
> </VirtualHost>
>
> Additionally you are adding the php modules twice: in your httpd.conf file
> and
> most likely on *.conf files present on the /var/www/conf/modules folder,
> which you are including with the "Include /var/www/conf/modules/*.conf"
> line, but this has nothing to do with the redirections.
>
>
> --
>
>


--
www.johntate.org

Reply via email to