In the D5 version of d.o, in the document root, there's a "release-history" directory with its own .htaccess file. While importing this stuff into SVN to deploy on d6.d.o, davidstrauss recommended we just handle it directly via the root .htaccess file.

This is a critical task before the upgrade so we can test that update_status still works.

I'm not much of a .htaccess hacker, so I'll work on this, but I'll need some help to make sure I don't break anything. ;)

Comments

dww’s picture

The way it currently works on d.o is there's a "release-history" directory in the document root with a symlink to the real project-release-server-history.php file, and the following .htaccess:

DirectoryIndex project-release-serve-history.php
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule ^(.*)$ project-release-serve-history.php?q=$1 [L,QSA]
</IfModule>

The idea is to put this logic directly into the root .htaccess file and don't bother with the release-history subdir at all. However, I don't understand mod_rewrite voodoo enough to make this work. ;) This isn't working on my test site:

# Handle requests for usage data
RewriteRule ^/release-history/(.*)$ sites/all/modules/project/release/project-release-serve-history.php?q=$1 [L,QSA]

the .htaccess is clearly being used, and rewriting works, but when I try to visit:

[site]/release-history/drupal

I just get a 403:

"You don't have permission to access /release-history/drupal on this server."

Help? ;)

dww’s picture

Title: Serve update_status XML files directly from root .htaccess file » Move updates.d.o to its own webroot

After further consideration in IRC, we decide it was better still to move updates.d.o into its own webroot. This avoids the release-history subdir hack from d.o's webroot entirely, and solves the problem of google indexing, etc, since updates.d.o will no longer be a full-blown copy of d.o, but its very own site. So, we're going to set all this up right now and test it, so we can have this as a separate site before the d.o upgrade itself tomorrow morning.

dww’s picture

Status: Active » Needs review

https://svn.drupal.org/drupal/updates.drupal.org/trunk now contains everything we need for this site. I've checked that out to /var/www/updates.drupal.org/htdocs on www1. If anyone else wants to test, here's how:

1) Put this in /etc/hosts:

140.211.166.6   updates2.drupal.org

2) Put this in settings.php:

$conf['update_fetch_url'] = 'http://updates2.drupal.org/release-history';

Currently, updates2.d.o is pointing to /var/www/updates.drupal.org/htdocs for its webroot.

Personally, I think we're ready to pull the trigger to change the webroot for updates.d.o itself, but I'd be happy to hear someone else tried to break it and couldn't. ;)

Thanks!
-Derek

dww’s picture

Note: if you're testing on D5, you want this in settings.php instead:

$conf['update_status_fetch_url'] = 'http://updates2.drupal.org/release-history';

(and you still need to tweak your copy of /etc/hosts)

alex_b’s picture

Just tested with Drupal 6.8. I got a valid response from the server. I can see suggested updates for Drupal, Coder, Devel and Views on admin/reports/updates .

crashtest_’s picture

Status: Needs review » Reviewed & tested by the community

Also works great on both of my installs, a 6.9 installation and on a 5.12.

dww’s picture

Status: Reviewed & tested by the community » Fixed

This is now live.

jcmarco’s picture

Status: Fixed » Postponed (maintainer needs more info)

I have this links for the modules updates links:

http://drupal.org/var/www/drupal.org/project/scripts/project/drupal

dww’s picture

Status: Postponed (maintainer needs more info) » Fixed

That bug's actually separate from this move -- it's due to the D6 port.
See #376550: Available Updates Links Broken about fixing this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nnewton’s picture

Assigned: dww » nnewton
Priority: Critical » Normal
Status: Closed (fixed) » Active

Re-opening this as we have discussed before to work on converting this webroot from PHP based serving to Apache/Rewrite-based.

-N

nnewton’s picture

The main issue with rewrite is that I don't particularly like rewrites that cross docroots. However, the PHP script already crosses docroots, so I'm willing to set that aside for now. Could we write this with a symlink though? This would allow us to at some point have a jenkins job drop release-history in the updates docroot itself.

-N

eliza411’s picture

Status: Active » Fixed

Closing old issues. Please re-open if needed.

Status: Fixed » Closed (fixed)
Issue tags: -drupal.org upgrade

Automatically closed -- issue fixed for 2 weeks with no activity.

Component: Webserver » Servers