[BlueOnyx:10554] Re: Sites with blank host

Michael Stauber mstauber at blueonyx.it
Sun May 13 08:05:37 -05 2012


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



More information about the Blueonyx mailing list