← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/launchpad:return-410-gone-loggerhead-vhost into launchpad:master

 

Guruprasad has proposed merging ~lgp171188/launchpad:return-410-gone-loggerhead-vhost into launchpad:master.

Commit message:
charm/launchpad-codehosting: Return 410 gone for all requests to the codebrowse vhost

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/487633
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:return-410-gone-loggerhead-vhost into launchpad:master.
diff --git a/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2 b/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2
index deb320d..3e94220 100644
--- a/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2
+++ b/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2
@@ -5,34 +5,11 @@
   CustomLog       /var/log/apache2/{{ domain_bzr }}-access.log combined_timer
   ErrorLog        /var/log/apache2/{{ domain_bzr }}-error.log
 
-  # This virtual host serves a few files/statics only; all else is reverse
-  # proxy to codebrowse.
-  DocumentRoot {{ loggerhead_static_dir }}
-
-  <Directory {{ loggerhead_static_dir }}>
-    Options -Indexes +SymLinksIfOwnerMatch
-    Require all granted
-  </Directory>
-
-  ProxyRequests off
-  <Proxy *>
-    <RequireAll>
-      Require all granted
-      # Cowboy to stop Sogou web spider smashing bazaar, 13-03-18
-      Require expr %{HTTP_USER_AGENT} !~ /^Sogou web spider/
-   </RequireAll>
-    ErrorDocument 500 /offline.html
-    ErrorDocument 502 /offline.html
-    ErrorDocument 503 /offline.html
-  </Proxy>
-  ProxyTimeout 20
-  ProxyPassReverse / {{ internal_codebrowse_root }}
+  # This virtual host used to serve a few files/statics only; all else was reverse
+  # proxied to codebrowse, which we are shutting down now.
 
+  # Ensure mod_rewrite is enabled
   RewriteEngine On
-  RewriteRule ^/offline.html$ - [L]
-  RewriteRule ^/robots.txt$ - [L]
-  RewriteRule ^/favicon.ico$ {{ loggerhead_static_dir }}/images/favicon.ico [L]
-  RewriteRule ^/static/(.*)$ /$1 [L]
-  RewriteRule ^/(.*)$ {{ internal_codebrowse_root }}$1 [P,L]
+  # Return 410 Gone for all requests
+  RewriteRule ^ - [G,L]
 </VirtualHost>
-

Follow ups