[BlueOnyx:10556] Re: Sites with blank host

Stephanie Sullivan ses at aviaweb.com
Sun May 13 12:56:50 -05 2012


Michael,

The center of my point is the SSL didn't work correctly UNLESS the sitename
was foo.com. When I tried using foo.com as an alias of www.foo.com there
were logs that pointed out the problem:

[Mon May 07 14:13:55 2012] [warn] RSA server certificate CommonName (CN)
`foo.com' does NOT match server name!?
[Mon May 07 14:17:52 2012] [warn] RSA server certificate CommonName (CN)
`foo.com' does NOT match server name!?
[Mon May 07 19:47:00 2012] [warn] RSA server certificate CommonName (CN)
`foo.com' does NOT match server name!?
[Mon May 07 19:47:10 2012] [warn] RSA server certificate CommonName (CN)
`foo.com' does NOT match server name!?
[Mon May 07 21:05:47 2012] [warn] RSA server certificate CommonName (CN)
`foo.com' does NOT match server name!?
[Mon May 07 22:05:30 2012] [warn] RSA server certificate CommonName (CN)
`foo.com' does NOT match server name!?

Soon as I changed the site name in the sitexx file to foo.com and the alias
to www.foo.com everything worked fine again. The problem showed itself as a
internal server error (500) in the browser and in the error log a fairly
cryptic 'malformed header' error where the malformed header was the path to
the site's assigned web owner root. It was devilishly difficult to figure
out what was going on. In the end I was in the shower washing my brain and
it came to me that the site name/alias might be at the root of the issue.
Usually I wash my brain and I can't do a thing with it :-)

Here is that log entry:
[Sun May 06 06:05:46 2012] [error] [client xx.xxx.xx.xxx] malformed header
from script. Bad header=/home/.sites/33/site5/.users/1: index.php

That's the issue. I tried it like you describe at first. Like I said: I HATE
editing sitexx files. You can't make that change in the sitexx.include file
- it's too late at the point it's included. It must be made in the sitexx
file.

As I tried to communicate in my original email I tried it the way you
suggest and it didn't work correctly when communicating with PayPal or
moreover when there was a (don't ask me why) a curl connection to the same
server. Bottom line: things were broken (not all that obviously) with
www.foo.com as the servername and foo.com as an alias. When that was
reversed and foo.com was the servername everything started working
correctly.

That plus the fact I had to manually create a ssl cert seems a good reason
to allow site creation without a host. What do you think it would break if
we took the host requirement away? Maybe there is the assumption the host
isn't null throughout the code? Maybe it would be a huge PITA to make
hostless sites possible. I don't know. I do know I come across sites more
that don't have a www. Or other host in front of them.

	Thanks,
		-Stephanie



> -----Original Message-----
> From: Michael Stauber [mailto:mstauber at blueonyx.it]
> Sent: Sunday, May 13, 2012 9:06 AM
> To: BlueOnyx General Mailing List
> Subject: [BlueOnyx:10554] Re: Sites with blank host
> 
> Hi Stephanie,
> 
> > I have a 5106r server where I needed to make a site without a blank
> host
> > field. Foo.com vs www.foo.com. The GUI didn't let me do this. I had
> to put
> > something into the host field.
> >
> > I thought great, turn off url rewriting and make foo.com an alias!
> Ala (in
> > the sitexx file):
> >
> > ServerName www.foo.com
> > ServerAlias foo.com
> >
> > Not so good...
> 
> I think I would do it the other way around, Stephanie: I'd create the
> site as
> www.foo.com and would make foo.com an alias.
> 
> Then I'd untick the checkbox for "Server alias redirects", so that
> both
> www.foo.com and foo.com work in the browser.
> 
> Then I'd create a .htaccess (or siteX.include) rewrite rule that
> redirects all
> traffic going to www.foo.com to foo.com instead. That solves that
> issue in a
> fashion which will not be broken by the GUI.
> 
> Of course the SSL issue remains and you'd have to manually create an
> SSL cert
> request that doesn't include the host name. Unless you go for a
> wildcard cert,
> which will increase the cost considerably.
> 
> > paypal's IPN processing didn't work quite right - resulting in a
> 500 error
> > on the server with a mysterious malformed headers error
> 
> I have been wondering about that, too. During the last week I have
> run into
> this twice. Once by directly accessing my Paypal account through
> www.paypal.com on my FC13 workstation with Firefox and once when
> using the
> same OS and browser to pay something at a vendor site. I'm not sure
> what that
> problem is about. I switched to Konqueror and it worked. So that
> header
> problem in respect with Paypal may not even be BlueOnyx related.
> 
> > I so despise manually editing a sitexx file. Anytime there is a
> change that
> > might cause the sitexx file to be regenerated things break. Not
> good.
> 
> Use the siteX.include files instead, Stephanie. They won't get
> overwritten. Or
> a .htaccess file in the /web directory. As the siteX.include file
> gets
> processed *after* the siteX file, you can even overwrite options in
> the
> siteX.include file that have been specified by the GUI in the siteX
> file. This
> even includes the document root of the Vsite.
> 
> --
> With best regards
> 
> Michael Stauber
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at mail.blueonyx.it
> http://mail.blueonyx.it/mailman/listinfo/blueonyx




More information about the Blueonyx mailing list