You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wordpress="This site looks like a WordPress blog; for the new URL to work properly, you'll need to access the WordPress admin interface via your old URL, go to General Settings, and change the WordPress address and Blog address to 'http://%s'."%t.hostname
28
-
32
+
path="/mit/%s/web_scripts/%s"% (
33
+
t.locker,
34
+
vhosts.get_path(t.locker, t.hostname),
35
+
)
36
+
wordpress= (
37
+
"This site looks like a WordPress blog; for the new URL to work properly, you'll need to access the WordPress admin interface via your old URL, go to General Settings, and change the WordPress address and Blog address to 'http://%s'."
38
+
%t.hostname
39
+
)
40
+
29
41
# Try to figure out what's up with the hostname currently
30
42
try:
31
-
page=urllib2.urlopen('http://%s/'%t.hostname)
43
+
page=urllib2.urlopen("http://%s/"%t.hostname)
32
44
content=page.read()
33
-
if ('<meta name="generator" content="WordPress'incontent
sitestatus="Your site appears to be working properly. Have fun!"
38
52
excepturllib2.HTTPErrorase:
39
-
if'wp-login'ine.geturl():
53
+
if"wp-login"ine.geturl():
40
54
sitestatus=wordpress
41
55
elife.code==404:
42
-
sitestatus="There doesn't seem to be any content currently at %s; make sure that directory exists and has an index.html, index.cgi, or similar, or change this hostname to point somewhere else at http://pony.scripts.mit.edu."%path
56
+
sitestatus= (
57
+
"There doesn't seem to be any content currently at %s; make sure that directory exists and has an index.html, index.cgi, or similar, or change this hostname to point somewhere else at http://pony.scripts.mit.edu."
58
+
%path
59
+
)
43
60
elife.code==403:
44
-
sitestatus="Visiting that page yields a Forbidden error; this is often caused by a lack of valid content at %s. Putting an index.html, index.cgi, or similar there may solve this. Alternately, you may just have your site password-protected or cert-protected."%path
61
+
sitestatus= (
62
+
"Visiting that page yields a Forbidden error; this is often caused by a lack of valid content at %s. Putting an index.html, index.cgi, or similar there may solve this. Alternately, you may just have your site password-protected or cert-protected."
63
+
%path
64
+
)
45
65
elife.code==401:
46
66
sitestatus="Visiting that page yields an Unauthorized error. This generally means that you have your site password-protected or cert-protected, so we can't confirm whether it's working."
47
67
else:
48
-
sitestatus="Visiting that page yields a %s error, suggesting a problem with the content at %s. Email us at [email protected] if you need help resolving this."% (e.code, path)
49
-
50
-
subject=u"Re: Request for hostname %s"%t.hostname
68
+
sitestatus= (
69
+
"Visiting that page yields a %s error, suggesting a problem with the content at %s. Email us at [email protected] if you need help resolving this."
70
+
% (e.code, path)
71
+
)
72
+
73
+
subject=u"Re: Request for hostname %s"%t.hostname
51
74
body=u"""Hello,
52
75
53
76
Just wanted to let you know that the hostname %(hostname)s is now configured and working. It currently points to %(path)s. Visit http://%(hostname)s/ to check it out.
0 commit comments