Hi,

First of all, I would like to ask somebody from the systems lisk to grant
me sudo on the php-web2 box, I can ssh into the box with my key, but I
can't sudo (my password doesn't work at all).

I want to resolve https://bugs.php.net/bug.php?id=67602
I would like to rename the php.net mirror hostname from www.php.net to
php.net(as that is what we prefer and set up in google as the primary
domain) and add a simple redirect to the apache vhost config, so requests
to www.php.net will be redirected to php.net
that would fix the problem for most of the users.

some background on the problem:
in the php.net codebase we generate absolute links to static assets using
the $MYSITE variable which is set from $_SERVER['SERVER_NAME']
we also use this $MYSELF for other stuff, like figuring it that which
mirror are we running on.

this was also used to detect when running on an unofficial mirror, we used
to display a notification in the footer, which were showing the mirror
details(hosting provider name and url) or the unofficial mirror string, but
this footer block was removed with the new design.
when we introduced the round robin mirror domains (us.php.net for example)
that caused that some mirrors were incorrectly flagged as unofficial, if
$_SERVER['SERVER_NAME'] contained cc.php.net instead of ccX.php.net
(because that is how we store and identify our mirrors).

to address we(I) came up with a clunky idea and updated
http://php.net/mirroring.php accordingly:
mirrors should always have the ccX.php.net in SERVER_NAME, (for apache that
means having the ccx.php.net for ServerName and having UseCanonicalName On).
Currently not all of the mirrors support that setup, so some mirrors will
link to cc.php.net when visiting cc.php.net, some others will link to
ccx.php.net.

Now that we don't use the mirror information for anything anymore (the
preferred language for the mirror is coming from the MIRROR_LANGUAGE env
var) I think it would make sense to rethink if our strategy and maybe
rework or remove that part, so the mirrors can use the HTTP_HOST for the
link generation, which would in turn fix the above mentioned bug for every
mirror and domain.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

Reply via email to