If you open https://upload.wikimedia.org/, you see a error "Unauthorized"
A redirect to commons or a placeholder page schould be created.
If you open https://upload.wikimedia.org/, you see a error "Unauthorized"
A redirect to commons or a placeholder page schould be created.
I don't think upload.wikimedia.org has anything to do with apache.
I tried curl -H "Host: upload.wikimedia.org" http://ms-fe.svc.eqiad.wmnet/ on bast1001 and got a "Wikimedia Upload" "There is no public index." "For a searchable repository of freely usable media files, please go to <a href="//commons.wikimedia.org/">Wikimedia Commons</a>." etc. response, so I doubt the problem is on Swift's end either. Something in Varnish/nginx?
Redirecting "/" on upload.wikimedia.org on both HTTP and HTTPS to https://commons.wikimedia.org seems reasonable and clean to me.
Well the response on https://upload.wikimedia.org has the following header:
Www-Authenticate: Swift realm="AUTH_mw"
So seems likely that the 401 error is generated by swift. I imagine rewrite.py is trying to rewrite the url to swift and failing.
Change 278924 had a related patch set uploaded (by Filippo Giunchedi):
varnish: redirect upload.wikimedia.org to commons
yeah what @Bawolff said! please see related patch to serve 301s out of varnish and redirect to commons instead
@Krenair sure, that comes from root container in swift eqiad, our rewrite.py middleware is serving it: https://github.com/wikimedia/operations-puppet/blob/production/modules/swift/files/SwiftMedia/wmf/rewrite.py#L289
Okay, but where is the HTML itself (within the puppet repo somewhere, I would hope)? It should get removed when varnish starts overriding requests for it with a commons redirect
Also that code references robots.txt which is also broken in the same way
And requests for favicon.ico just result in a 504 Gateway Time-out from nginx
@Krenair in swift eqiad ATM
root@ms-fe1001:~# swift list root
crossdomain.xml
favicon.ico
index.html
robots.txt
root@ms-fe1001:~# swift download root crossdomain.xml
crossdomain.xml [auth 0.022s, headers 0.050s, total 0.051s, 0.007 MB/s]
root@ms-fe1001:~# swift download root robots.txt
robots.txt [auth 0.028s, headers 0.155s, total 0.155s, 0.000 MB/s]
root@ms-fe1001:~# swift download root index.html
index.html [auth 0.024s, headers 0.033s, total 0.034s, 0.481 MB/s]
root@ms-fe1001:~# cat crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
root@ms-fe1001:~# cat robots.txt
User-agent: *
Disallow: /wikipedia/commons/archive/
root@ms-fe1001:~# head index.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wikimedia Upload</title>
<link rel="shortcut icon" href="/favicon.ico">
<style type="text/css">
* {
font-family: 'Gill Sans', 'Gill Sans MT', sans-serif;
}
a:link, a:visited {given robots and crossdomain.xml are also there, I've restored the container in codfw too since it was a regression.
I still think we should redirect upload homepage to commons though, and/or have the files somewhere other than swift containers