[error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

4,532 views
Skip to first unread message

cgallagher

unread,
Aug 18, 2008, 6:41:57 PM8/18/08
to Phusion Passenger Discussions
Hi,

I've just installed Phusion Passenger for the first time and
everything went smoothly until I attempted to modify my apache config.

The error that im getting is:

[error] VirtualHost *:80 -- mixing * ports and non-* ports with a
NameVirtualHost address is not supported, proceeding with undefined
results

The section that I added to the config was as follows:

<VirtualHost *:80>
ServerName www.chris-gallagher.com
DocumentRoot /var/www/vhosts/chris-gallagher.com/
httpdocs/simplelog_2.0.2/public/
</VirtualHost>


Any ideas on what might be causing this? Im fairly new to apache so
this may be something quite trivial.

Cheers,
Chris

Lucas Florio

unread,
Aug 18, 2008, 6:57:45 PM8/18/08
to phusion-...@googlegroups.com
That's an apache thing.

You have to edit you apache.conf file. You probably have one line that says something like NameVirtualHost *. It should say NameVirtualHost *:80.

Try that and let me know...

Regards
--
Lucas Florio
Developer
----
Nora Ephron
"Insane people are always sure that they are fine. It is only the sane people who are willing to admit that they are crazy."

cgallagher

unread,
Aug 18, 2008, 7:11:04 PM8/18/08
to Phusion Passenger Discussions
Thanks for the quick reply.

Im looking in my apache.conf file and i dont see anything like that.

I do have a ports.conf file though and this has ports listed as 80 and
443. This isnt anything to do with it is it?

I am running apache 2.2.3 by the way.

On Aug 18, 11:57 pm, "Lucas Florio" <lucas...@gmail.com> wrote:
> That's an apache thing.
>
> You have to edit you apache.conf file. You probably have one line that says
> something like NameVirtualHost *. It should say NameVirtualHost **:80*.
>
> Try that and let me know...
>
> Regards
>
>
>
> On Mon, Aug 18, 2008 at 19:41, cgallagher <cgallag...@gmail.com> wrote:
>
> > Hi,
>
> > I've just installed Phusion Passenger for the first time and
> > everything went smoothly until I attempted to modify my apache config.
>
> > The error that im getting is:
>
> > [error] VirtualHost *:80 -- mixing * ports and non-* ports with a
> > NameVirtualHost address is not supported, proceeding with undefined
> > results
>
> > The section that I added to the config was as follows:
>
> > <VirtualHost *:80>
> >         ServerNamewww.chris-gallagher.com
> >               DocumentRoot /var/www/vhosts/chris-gallagher.com/
> > httpdocs/simplelog_2.0.2/public/<http://chris-gallagher.com/httpdocs/simplelog_2.0.2/public/>

Lucas Florio

unread,
Aug 18, 2008, 7:14:43 PM8/18/08
to phusion-...@googlegroups.com
It could be on some included file, like vhosts.conf.
Which Operating System are you using?

cgallagher

unread,
Aug 18, 2008, 7:19:59 PM8/18/08
to Phusion Passenger Discussions
Debian GNU/Linux on VPS hosting.

Im not seeing a file such as that but ill look further

heres some info on what im looking at:

vps-1000885-330:~# cd /etc/apache2/
vps-1000885-330:/etc/apache2# ls -la
total 72
drwxr-xr-x 7 root root 4096 Aug 19 00:13 .
drwxr-xr-x 79 root root 4096 Aug 18 19:10 ..
-rw-r--r-- 1 root root 24653 Aug 18 23:32 apache2.conf
drwxr-xr-x 2 root root 4096 Aug 18 19:10 conf.d
-rw-r--r-- 1 root root 895 Jun 17 17:06 envvars
-rw-r--r-- 1 root root 0 Aug 17 23:35 httpd.conf
-r-------- 1 root root 2954 Jul 15 16:00 httpd.pem
drwxr-xr-x 2 root root 8192 Aug 9 17:23 mods-available
drwxr-xr-x 2 root root 4096 Aug 16 14:50 mods-enabled
-rw-r--r-- 1 root root 21 Aug 19 00:04 ports.conf
drwxr-xr-x 2 root root 4096 Aug 9 17:23 sites-available
drwxr-xr-x 2 root root 4096 Jun 17 17:06 sites-enabled

cgallagher

unread,
Aug 18, 2008, 7:22:27 PM8/18/08
to Phusion Passenger Discussions
Ok Ive found the following in zz010_psa_httpd.conf :

NameVirtualHost 78.153.208.167:80
NameVirtualHost 78.153.208.167:443
ServerName vps-1000885-330.cp.blacknight.com
ServerAdmin cgall...@gmail.com

DocumentRoot /var/www/vhosts/default/htdocs

what should i change this to or is this the place to modify?



On Aug 19, 12:11 am, cgallagher <cgallag...@gmail.com> wrote:

Lucas Florio

unread,
Aug 18, 2008, 7:24:53 PM8/18/08
to phusion-...@googlegroups.com
Try this:

<VirtualHost 78.153.208.167:80>
        ServerName www.chris-gallagher.com
        DocumentRoot /var/www/vhosts/chris-gallagher.com/httpdocs/simplelog_2.0.2/public/
</VirtualHost>

cgallagher

unread,
Aug 18, 2008, 7:34:00 PM8/18/08
to Phusion Passenger Discussions
Excellent, now apache is starting without any errors :)

Only problem now is that rails doesnt seem to be serving pages for
some reason.

Do I need to start up any kind of server from within my rails
application to get the project going or anything like that?

On Aug 19, 12:24 am, "Lucas Florio" <lucas...@gmail.com> wrote:
> Try this:
>
> <VirtualHost 78.153.208.167:80>
>         ServerNamewww.chris-gallagher.com
>         DocumentRoot /var/www/vhosts/
> chris-gallagher.com/httpdocs/simplelog_2.0.2/public/
> </VirtualHost>
>
>
>
> On Mon, Aug 18, 2008 at 20:22, cgallagher <cgallag...@gmail.com> wrote:
>
> > Ok Ive found the following in zz010_psa_httpd.conf :
>
> > NameVirtualHost 78.153.208.167:80
> > NameVirtualHost 78.153.208.167:443
> > ServerName vps-1000885-330.cp.blacknight.com
> > ServerAdmin cgallag...@gmail.com

Lucas Florio

unread,
Aug 18, 2008, 7:42:00 PM8/18/08
to phusion-...@googlegroups.com
Add this to your VirtualHost conf

RailsBaseURI /
RailsAllowModRewrite off

cgallagher

unread,
Aug 18, 2008, 7:48:02 PM8/18/08
to Phusion Passenger Discussions
So i should no have this in my config?

<VirtualHost 78.153.208.167:80>
ServerName www.chris-gallagher.com
DocumentRoot /var/www/vhosts/chris-gallagher.com/
httpdocs/simplelog_2.0.2/public
RailsBaseURI /
RailsAllowModRewrite off
</VirtualHost>

Doesnt seem to work for me.

Lucas Florio

unread,
Aug 18, 2008, 7:55:01 PM8/18/08
to phusion-...@googlegroups.com
Man, you are killing me :)

I am trying to go to http://www.chris-gallagher.com/ but I am getting a Permission Denied.

Replace everything with:
<VirtualHost 78.153.208.167:80>
    ServerName www.chris-gallagher.com
    DocumentRoot /var/www/vhosts/chris-gallagher.com/httpdocs/simplelog_2.0.2/public
    RailsBaseURI /
    RailsAllowModRewrite off
    <directory "/var/www/vhosts/chris-gallagher.com/httpdocs/simplelog_2.0.2/public">
    Order allow,deny
    Allow from all
  </directory>
</VirtualHost>

cgallagher

unread,
Aug 18, 2008, 8:08:47 PM8/18/08
to Phusion Passenger Discussions
Hehe sorry about this :(

Still no joy though. The reason for the 403 is that I previously had a
static html file in there but once apache didnt seem to be serving any
rails pages, i removed the index.html file to see if it was something
similar to other systems, where the index.html will override all
others.

Its really weird because everything starts up as expected, without
error. I have run mongrel in a similar fashion before without any
major trouble and really wanted to try this out as it seems much more
cleaner :)

Im stumped!

On Aug 19, 12:55 am, "Lucas Florio" <lucas...@gmail.com> wrote:
> Man, you are killing me :)
>
> I am trying to go tohttp://www.chris-gallagher.com/but I am getting a
> Permission Denied.
>
> Replace everything with:
> <VirtualHost 78.153.208.167:80>
>     ServerNamewww.chris-gallagher.com
>     DocumentRoot /var/www/vhosts/
> chris-gallagher.com/httpdocs/simplelog_2.0.2/public
>     RailsBaseURI /
>     RailsAllowModRewrite off
>     <directory "/var/www/vhosts/
> chris-gallagher.com/httpdocs/simplelog_2.0.2/public">
>     Order allow,deny
>     Allow from all
>   </directory>
> </VirtualHost>
>
>
>
> On Mon, Aug 18, 2008 at 20:48, cgallagher <cgallag...@gmail.com> wrote:
>
> > So i should no have this in my config?
>
> > <VirtualHost 78.153.208.167:80>
> >         ServerNamewww.chris-gallagher.com
> >                 DocumentRoot /var/www/vhosts/chris-gallagher.com/
> > httpdocs/simplelog_2.0.2/public<http://chris-gallagher.com/httpdocs/simplelog_2.0.2/public>

Lucas Florio

unread,
Aug 18, 2008, 8:12:49 PM8/18/08
to phusion-...@googlegroups.com
If you put a static page in the public directory, and go directly to see it, can you?
I was trying with this: http://www.chris-gallagher.com/images/rails.png, but I get the same error message. Did you put the snippet I just gave you?
Reply all
Reply to author
Forward
0 new messages